We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

No context message from dialog, no WM_UNINITMENUPOPUP windows message

Thread ID:

Created:

Updated:

Platform:

Replies:

29562 May 27,2005 01:52 PM Jun 2,2005 12:58 PM Windows Forms 3
loading
Tags: Tools
John Huschka
Asked On May 27, 2005 01:52 PM

If I''m reading the code correctly, Syncfusion''s ContextMenuPlaceHolder class displays a context menu by listening for the WM_UNINITMENUPOPUP event. (See CallWndProc method.) I want to display a context menu from a modal dialog (displayed via ShowDialog). Everything is working, the "OnPopup" event is fired, the ContextMenuPlaceHolder CallWndProc listener get configured; however, the menu never displays because WM_UNINITMENUPOPUP is never received. Is there anything/what can I do about this? This all does work (WM_UNINITMENUPOPUP is received) if I use Show for the dialog--which I do not want to do. The situation is rather messy because the listener continues listening to messages(presumably) as long as the application is running. Running 2.1.0.9, Windows Server 2003. Thanks!

John Huschka
Replied On May 27, 2005 02:52 PM

An update... The behavior is only observed if the dialog from which I want to display the context menu was itself launched by a context menu (via ShowDialog). If it is launched from a menu or toolbar, I can get the context menu from the dialog.

John Huschka
Replied On June 2, 2005 12:40 PM

An update: Setting SynchronousPopup to false fixes the problem. I''m glad that it fixes the problem, but I''m a bit concerned: If setting this property to false basically makes things work, why is the default true? What are the implications of setting it to false? Is there documentation on this?

Administrator [Syncfusion]
Replied On June 2, 2005 12:58 PM

Hi John, If I remember correctly, SynchronousPopup = false prevents the ContextMenu from going on the current message stack. Instead, it is momentarily delayed with a Timer, so that the current stack is not frozen by the context menu. I believe that SynchronousPopup = true is the "correct" way to show a ContextMenu, but in some circumstances (mostly involving modal dialogs), it just doesn''t work. If you have anymore questions, please let me know, and I apologize for the previous lack of answers. Regards, Gregory Austin Syncfusion Inc. >An update: Setting SynchronousPopup to false fixes the problem. > >I''m glad that it fixes the problem, but I''m a bit concerned: If setting this property to false basically makes things work, why is the default true? What are the implications of setting it to false? Is there documentation on this?

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;