How to handle the messages from C++GUI to Java GUI
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   kamacharulu_ramoju
Posted On:   Thursday, August 22, 2002 03:16 AM

Any one provide me the information about the communication mechanism (Parent child....relation)between C++ to java. I am writing the scenario below. C++ to Java: 1. I have a MFC application with a button named " Invoke Java from C++" : void CTestDlg::OnInvokeJavaFromC() { //Create a VM using JNI_CreateJavaVM() //Find the class using FindClass() //Execute the method GetStaticMethodID() } 2. The Java class consists of a method which pops a simple JDilaog void FnCalledFromC() { JDialog jd = new J   More>>

Any one provide me the information about the communication mechanism (Parent child....relation)between C++ to java.


I am writing the scenario below.



C++ to Java:



1. I have a MFC application with a button named " Invoke Java from C++" :



void CTestDlg::OnInvokeJavaFromC()


{


//Create a VM using JNI_CreateJavaVM()


//Find the class using FindClass()


//Execute the method GetStaticMethodID()


}




2. The Java class consists of a method which pops a simple JDilaog



void FnCalledFromC()


{


JDialog jd = new JDialog("hello how are u");


jd.SetVisible(true);// just to show the screen.


}



Issue1. When the child(Java Dialog) is moved by dragging over the parent(C++ Dialog) the parent is not getting re-painted. Can anyone help us how to repaint the parent in this case?



Issue2. When I click on the button "Invoke Java from C++" and If I switch from one applicaiton to using mouse from the windows task bar I cannot get back to our parent application(C++ Dialog). I have to use the Alt+Tab to get back to the child(Java Dialog).




(General behaviour is that when u click the parent entry in the taskbar then the child nad parent will show up)

   <<Less
About | Sitemap | Contact