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 / GUI / January 2004

Tip: Looking for answers? Try searching our database.

Access a frame's message map? (Windows only for now)

Thread view: 
Jeremy - 06 Jan 2004 21:13 GMT
Is there any way to mess with a frame's message map in Windows?  There are
some specific messages I want to handle myself (or even just ignore).  Can
this be done using JNI?

Thanks,
-Jeremy
Todd Corley - 07 Jan 2004 13:37 GMT
Your question is pretty vague.  What are you trying to accomplish.  

Assuming you want to be notified by or control things like window
closing, window minimized, ect...My answer is:

You need to read up a little more on events.
java.awt.event.WindowListener to be more specific.  

Hope this helps,
Todd
Jeremy - 07 Jan 2004 21:03 GMT
Specifically I want to assign some code, preferably C code, to the
WM_WINDOWPOSCHANGING message.  There is no event for this in Java.  I need
to use this message in order to "glue" a window to the desktop.  If I simply
force the window to the back during the windowActivated event, the frame
flickers to the top and is then sent to the back.  The reason I need the
windows message is because it's triggered before the window is actually
moved; as far as I've found out there is no equivalent event in java.

-Jeremy

> Your question is pretty vague.  What are you trying to accomplish.
>
[quoted text clipped - 6 lines]
> Hope this helps,
> Todd
Todd Corley - 08 Jan 2004 13:45 GMT
It will not provide you with a pre-move message, but:
java.awt.event.ComponentListener
will inform you of any changes in the frames location, size, or visibility state.

It is not vetoable, but you can use the event to undo changes you do not allow.

> Specifically I want to assign some code, preferably C code, to the
> WM_WINDOWPOSCHANGING message.  There is no event for this in Java.  I need
[quoted text clipped - 3 lines]
> windows message is because it's triggered before the window is actually
> moved; as far as I've found out there is no equivalent event in java.
ak - 08 Jan 2004 00:53 GMT
> Is there any way to mess with a frame's message map in Windows?  There are
> some specific messages I want to handle myself (or even just ignore).  Can
> this be done using JNI?

see
http://java.sun.com/j2se/1.4.2/docs/guide/awt/1.3/AWT_Native_Interface.html

____________

http://reader.imagero.com the best java image reader.


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.