This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills: The software developer's life manual and have John Sonmez on-line!
See this thread for details.
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

[URGENT]Getting Window Handle of a JFrame

 
Anirban dutta
Ranch Hand
Posts: 89
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 24204
34
Chrome Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You want to look at the AWT Native Interface The example code there shows you exactly what you need to do.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic