From: Breizhhh on 2 Apr 2010 05:36 Hi, I'm using JNI to display a java JFrame into a C++ program. It works well except when I add this JFrame into a CTabCtrl. In this case, when the mouse entered the JFrame the CPU increases, and if I click it's exactly the same but my C++ application loose the handle. The only way to regain the control is to active another window and then select my application. It is weird because when I don't attach it to a CTabCtrl there isn't any problem. If someone know why this is happening, that would be very nice. Thanks.
From: Joseph M. Newcomer on 2 Apr 2010 12:36 Define "lose the handle". What does this mean? joe On Fri, 2 Apr 2010 02:36:02 -0700, Breizhhh <Breizhhh(a)discussions.microsoft.com> wrote: >Hi, > >I'm using JNI to display a java JFrame into a C++ program. It works well >except when I add this JFrame into a CTabCtrl. In this case, when the mouse >entered the JFrame the CPU increases, and if I click it's exactly the same >but my C++ application loose the handle. The only way to regain the control >is to active another window and then select my application. It is weird >because when I don't attach it to a CTabCtrl there isn't any problem. > >If someone know why this is happening, that would be very nice. >Thanks. Joseph M. Newcomer [MVP] email: newcomer(a)flounder.com Web: http://www.flounder.com MVP Tips: http://www.flounder.com/mvp_tips.htm
From: Breizhhh on 6 Apr 2010 03:20 It means that I can't click anywhere. No events are detected. It's like there is a hidden window in front of my application which intercepts everything. "Joseph M. Newcomer" wrote: > Define "lose the handle". What does this mean? > joe > > On Fri, 2 Apr 2010 02:36:02 -0700, Breizhhh <Breizhhh(a)discussions.microsoft.com> wrote: > > >Hi, > > > >I'm using JNI to display a java JFrame into a C++ program. It works well > >except when I add this JFrame into a CTabCtrl. In this case, when the mouse > >entered the JFrame the CPU increases, and if I click it's exactly the same > >but my C++ application loose the handle. The only way to regain the control > >is to active another window and then select my application. It is weird > >because when I don't attach it to a CTabCtrl there isn't any problem. > > > >If someone know why this is happening, that would be very nice. > >Thanks. > Joseph M. Newcomer [MVP] > email: newcomer(a)flounder.com > Web: http://www.flounder.com > MVP Tips: http://www.flounder.com/mvp_tips.htm > . >
From: Joseph M. Newcomer on 6 Apr 2010 14:08 Sorry, "losing the handle" is not what you described below. "Losing the handle" means that the numerical value which you had, which represented the window handle, has been lost. What you are describing is a condition in which the window does not respond to mouse clicks. Characterizing that as "losing the handle" is nonsense. I thought you meant that the handle value was no longer valid, which is what your description means! Who is managing the message pump at that point? If you do not have a functional message pump, the window will not "respond" because nobody is sending it messages. Have you considered using Spy++ to analyze this problem? joe On Tue, 6 Apr 2010 00:20:01 -0700, Breizhhh <Breizhhh(a)discussions.microsoft.com> wrote: >It means that I can't click anywhere. No events are detected. It's like there >is a hidden window in front of my application which intercepts everything. > >"Joseph M. Newcomer" wrote: > >> Define "lose the handle". What does this mean? >> joe >> >> On Fri, 2 Apr 2010 02:36:02 -0700, Breizhhh <Breizhhh(a)discussions.microsoft.com> wrote: >> >> >Hi, >> > >> >I'm using JNI to display a java JFrame into a C++ program. It works well >> >except when I add this JFrame into a CTabCtrl. In this case, when the mouse >> >entered the JFrame the CPU increases, and if I click it's exactly the same >> >but my C++ application loose the handle. The only way to regain the control >> >is to active another window and then select my application. It is weird >> >because when I don't attach it to a CTabCtrl there isn't any problem. >> > >> >If someone know why this is happening, that would be very nice. >> >Thanks. >> Joseph M. Newcomer [MVP] >> email: newcomer(a)flounder.com >> Web: http://www.flounder.com >> MVP Tips: http://www.flounder.com/mvp_tips.htm >> . >> Joseph M. Newcomer [MVP] email: newcomer(a)flounder.com Web: http://www.flounder.com MVP Tips: http://www.flounder.com/mvp_tips.htm
From: divya_rathore on 7 Apr 2010 03:02
For curiosity sake.. is there some tutorial around for using JNI with C ++? Can you point it out for me? An old idea that remains unimplemented has following scenario: a given raw data array (could be unsigned char, int, float, double arrays defined in Java code) would be passed to a C++ dll. The dll processes/modifies that array and returns back to java app. thanks in advance, - Divya |