Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / July 2006

Tip: Looking for answers? Try searching our database.

JNI window question

Thread view: 
hilz - 21 Jul 2006 00:28 GMT
Hi.
I have an Java Swing application that has a JFrame. I also call into a
native dll using JNI to launch a native dialog from this dll.
This native dialog appears below the JFrame and is not visible unless
the user looks in the task bar and clicks on it.
Is there a way to make this dialog appear on top of my JFrame?
Help is appreciated.
thanks.
Jean-Francois Briere - 21 Jul 2006 05:18 GMT
In your native code just before launching the native dialog do:
HWND handle = FindWindow(NULL, yourmainFrameTitle);
Then use this handle as parent window handle on your native dialog.

Regards
hilz - 21 Jul 2006 16:33 GMT
> In your native code just before launching the native dialog do:
> HWND handle = FindWindow(NULL, yourmainFrameTitle);
> Then use this handle as parent window handle on your native dialog.
>
> Regards

Thanks Jean.
My main frame has a variable name, but it always starts with a word that
i know.
is there another function that matches a regex expression for example? I
tried to find one, but can't find any.

Your help is greatly appreciated.
thanks
hilz - 21 Jul 2006 18:03 GMT
>> In your native code just before launching the native dialog do:
>> HWND handle = FindWindow(NULL, yourmainFrameTitle);
[quoted text clipped - 10 lines]
> Your help is greatly appreciated.
> thanks

Ok, never mind... i found it.
I can use the EnumWindows to get the windows and test them one by one.

Sorry for the OT. this has nothing to do with Java!
Thanks


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.