How MessageBox() kills active context menu
-
I've noticed within my MFC application that should a MessageBox() API be invoked while the user is displaying a context menu that the menu is taken down and the MessageBox is shown. However, if a DoModal() API is called to show one of my dialogs while a context menu is being shown the menu stays up but you can no longer select from it. Its kind of frozen. How can I go about causing the context menu to go away prior to calling the DoModal() API? Is there a way to search for a visible menu and then subsequently destroy them? Any ideas or code snipits? Craig
-
I've noticed within my MFC application that should a MessageBox() API be invoked while the user is displaying a context menu that the menu is taken down and the MessageBox is shown. However, if a DoModal() API is called to show one of my dialogs while a context menu is being shown the menu stays up but you can no longer select from it. Its kind of frozen. How can I go about causing the context menu to go away prior to calling the DoModal() API? Is there a way to search for a visible menu and then subsequently destroy them? Any ideas or code snipits? Craig
Send
WM_CANCELMODE
to the menu's owner window. --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | 1ClickPicGrabber | NEW~! CP SearchBar v3.0 | C++ Forum FAQ Kosh reminded me of some of the prima-donna programmers I've worked with. Knew everything but when you asked them a question; never gave you a straight answer. -- Michael P. Butler in the Lounge -
Send
WM_CANCELMODE
to the menu's owner window. --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | 1ClickPicGrabber | NEW~! CP SearchBar v3.0 | C++ Forum FAQ Kosh reminded me of some of the prima-donna programmers I've worked with. Knew everything but when you asked them a question; never gave you a straight answer. -- Michael P. Butler in the Lounge