wood burning stoves 2.0*
The moose likes Java in General and the fly likes [URGENT]Getting Window Handle of a JFrame Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "[URGENT]Getting Window Handle of a JFrame" Watch "[URGENT]Getting Window Handle of a JFrame" New topic
Author

[URGENT]Getting Window Handle of a JFrame

Anirban dutta
Ranch Hand

Joined: Aug 08, 2002
Posts: 89
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.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

You want to look at the AWT Native Interface The example code there shows you exactly what you need to do.


[Jess in Action][AskingGoodQuestions]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: [URGENT]Getting Window Handle of a JFrame
 
Similar Threads
Urgent !
Urgent!
URGENT!!!
JNI (urgent please)
Urgent Help!!!