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 » Uncorrect display of menu titles. Collapse All
Subject Author Date
Eric Houvenaghel Aug 17, 2006 - 8:47 AM

I’ve got a weird behavior with your CExtMenuControlBar. I have one menu in the main dialog and another one in a modal child-dialog.

The first display of the main dialog menu is correct (menu titles and menu items). Also the display of the child-dialog menu is always correct.

But once i close the child-dialog and move the mouse under the main dialog menu, menu display the titles of the child-dialog menu ; Menu items are still correct.
Is it normal? I’m using g_CmdManager->ProfileWndAdd(__PROF_UIS_PROJECT_CMD_PROFILE_NAME, GetSafeHwnd()); twice in the main dialog and in the child-dialog. Am i ok? Or do i need to use CExtMenuControlBar::_UpdateMenuBar() to tell to the main dialog menu to rebuild itself?

What is the problem and what is the better solution?
Regards

Technical Support Aug 17, 2006 - 12:11 PM

There is a small restriction when using the CExtMenuControlBar window: there must be one instance of CExtMenuControlBar window in scope of one command manager’s command profile. This means you should have a separate command profile for your dialog with menu bar. This command profile can be initialized in the OnInitDialog() method and destroyed in the OnOK() (or OnCancel()) method.