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 » Require an equivalent to InsertMenuItem() (MFC) to insert manu items in Prof-UI Collapse All
Subject Author Date
howard liu May 28, 2008 - 3:26 AM

Hi, <o:p></o:p>


In my application I would like to  create an CExtControlMenuBar and to this add  menu items by using something like InsertMenuItem (MFC type). I would like to know a method in Prof UI that is equivalent of InsertMenuItem( ) in MFC  that will enable us to add menu items to an already existing menu list either statically or dynamically. We are are looking at an alternative option to overriding the _UpDateMenuBar( ). We would like to have a solution by having a method that would insert a menu item to the menu bar from being any where in the application (NOT specifically only through the _UpDateMenuBar() handler).<o:p></o:p>


Thanks, <o:p></o:p>


Howard  <o:p></o:p>

Technical Support May 29, 2008 - 4:05 AM

It’s not possible to provide the menu bar with custom buttons in the menu line without overriding the _UpdateMenuBar() virtual method. Of course, we are talking about a non-customizable menu bar. You can implement exactly the same _UpdateMenuBar() method but it will build the content using a custom CMenu object. Different subsystems in your application should simply modify the menu tree, update the command manager from it and, finally update the menu bar by invoking its CExtMenuControlBar::UpdateMenuBar() method.