|
-
April 15th, 1999, 07:53 AM
#1
Popup Menu.
I'm looking for a way to destroy a popmenu after the mouse cursor has strayed away from the menu. An example of this behavior can be seen at MSNBC.com, when you mouse over a top menu item, a cascading menu popups up, now move the mouse away from the popup and after a second or two the popup menu disappears. MSNBC implements this in Java script code, is there away to get the same effect using WIN32?
thanks in advance
bill baker
-
April 16th, 1999, 02:37 AM
#2
Re: Popup Menu.
Problem here is to detect the mouse leaving the popup window, and then do the destruction. Check
TrackMouseEvent(...) function (only NT says the docs...)
Or maybe use SetCapture and in OnMouseMove check if you are outside the popup window, then ReleaseCapture and destroy menu...
/Rob
-
April 16th, 1999, 07:33 AM
#3
Re: Popup Menu.
Thanks for the reply.
I've tried both solutions, however TrackPopupMenu captures the mouse! Thus the main window no longer recieves mouse messages.
-
April 16th, 1999, 07:45 AM
#4
Re: Popup Menu.
In that case, how about trying to derive a class from CMenu that handles this mouse movement code?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|