Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » MDI Caption Bar Menu Collapse All
Subject Author Date
Daisy Peterson Apr 15, 2008 - 1:51 PM

In our application we have a menu that shows up when the user right clicks the caption/title bar of an MDI child window.  Since upgrading the main frame to utilize Prof-UIS menus and toolbars and such, now when right clicking on the title of an MDI child, we get the system menu (themed to match the main frame).  Is there a way to turn this off so our menu can be shown?


Kevin Murray (kmurray@agi.com)

AGI


 

Daisy Peterson Apr 16, 2008 - 1:21 PM

I have no problem with the theme on the system menu; I have a problem with the system menu being shown when the user right clicks the MDI Child’s title bar.  I can use the flag


CExtMenuControlBar::m_bAllowProfChildFrameSysmenu


to turn off the system menu processing of the MDI Child, but that’s not what I want -- theme the system menu, just don’t show it on the right click.


 


Kevin Murray

Technical Support Apr 18, 2008 - 3:24 AM

You should override the CExtMenuControlBar::TrackChildFrameSystemMenu() internal virtual method. Its pPoint parameter is a non-NULL value if the method is invoked on mouse clicks. Your method should track a custom popup menu or invoke the parent class method. The returned value indicates whether the popup menu has been created and tracked successfully.

Technical Support Apr 16, 2008 - 5:10 AM

The skinned system menu is completely controlled by the CExtMenuControlBar class. If the MDI child frame window is maximized, the icon button for it is displayed as the first button in the menu bar. We think it’s correct that this button displays a skinned/themed system menu of the MDI child frame window because all the other buttons of the menu bar also display skinned/themed popup menus. That is why we decided that the menu bar should also display skinned/themed menus for the MDI child frame windows in the non-maximized state. Besides, this approach generally provides a more consistent and solid themed application look. You can insert your custom menu items into the system menu of the MDI child frame windows. But Prof-UIS requires that your custom menu command items should have the registered CExtCmdItem command descriptions in the command manager. So, if you inserted some ID_MY_MENU_COMMAND item into the MDI child frame’s system menu, then you should also invoke the CExtCmdItem * pCmdItem = g_CmdManager->CmdAllocPtr( ..., ID_MY_MENU_COMMAND); code for it and initialize the required properties of the returned CExtCmdItem object.