Dear all, I want to how can I get the Window Handle of a window of a java application. Actually the basic problem is I have a C++ code which I am calling through JNI. The C++ code contains code for showing message box under certain conditions. This is done by the MessageBox function of Win32 SDK library. The message box comes properly, but the problem is that it comes as minimized for the first time. When I click on the minimized icon of the message box then it pops up and then from the next time it is shown properly on the top of the Java window. I think it is basically a focus problem OR the MessageBox function requires a handle of the window over which it has to be shown. I think I could get the handle of the Java Window and pass it to the MessageBox function then it will function properly. Am I right in thinking so, or there is some other problem. Please help me in this regard. IT IS URGENT. PLEASE.