No context message from dialog, no WM_UNINITMENUPOPUP windows message

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!

3 Replies

JH John Huschka May 27, 2005 06:52 PM UTC

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.


JH John Huschka June 2, 2005 04:40 PM UTC

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?


AD Administrator Syncfusion Team June 2, 2005 04:58 PM UTC

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?

Loader.
Up arrow icon