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.
Subject |
Author |
Date |
|
Chris Anderson
|
Apr 18, 2007 - 3:39 PM
|
Hi, I would like to remove a couple of popup menus from the top-level menu bar. This needs to be done as soon as as the application is invoked. Since Prof UIS menubar is based on the toolbar, how would I go about removing/inserting specific popup menu based on some application logic? Thanks
|
|
Technical Support
|
Apr 19, 2007 - 5:43 AM
|
Because the CExtMenuControlBar class is derived from CExtToolControlBar , the menu bar is kind of toolbar and the top menu level is based on toolbar buttons. The menu bar builds its own list of toolbar buttons in the CExtMenuControlBar::_UpdateMenuBar() internal virtual method which you can override and build the menus you need. This method is invoked once at startup in the SDI application. It is invoked many times in the MDI application: when MDI child frame is created or destroyed and when the active MDI child frame changes. This method is also invoked when your code invokes the CExtMenuControlBar::LoadMenuBar() or CExtMenuControlBar::UpdateMenuBar() methods.
|
|
Suhai Gyorgy
|
Apr 19, 2007 - 1:55 AM
|
You can use RemoveButton method of CExtToolControlBar to remove top-level menuitems. The method accepts an index as parameter, so to remove 3rd button, you can call m_wndMenuBar.RemoveButton(2);
|
|