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 » Statusbar Text for dynamic menuitems added with ItemInsertCommand Collapse All
Subject Author Date
Dominik Braendlin Nov 30, 2007 - 5:47 AM

Dear Tech Support,
Is it possible to add status bar text for menu items that have been added dynamically with ItemInsertCommand.
If this is not possible and I have to use the command manager to do so. How can I implement the following problem?
I want to display a part of a directory Structure in the MainFrame menu. To do so I have an ID section of about 100 Ids (51000 - 51099). How can I register these on Create with the CMD manager since I never know how many Ids will be used? General: Any example about adding / removing menuitems that are not resource based (UpdateFromMenu / UpdateFromToolBar) functions cannot be used.
Regards
Adrian

Technical Support Nov 30, 2007 - 9:43 AM

Status tips are supported only for menu items whose data is stored in the command manager. You should register your commands in the command manager first. g_CmdManager->CmdAllocPtr() allocates a new command description object and you can set a string for the status tip in CExtCmdItem::m_sTipStatus. The g_CmdManager->CmdAllocPtr() takes one parameter that is if not zero, specifies the desired command identifier (you assign set directly), and if it is zero, the command identifier will be generated by the method itselself. In Prof-UIS, the range of 29000 to 32000 is used internally. All the other identifiers are available for you. You can use an allocated command identifier when using the CExtPopupMenuWnd::ItemInsert() method rather than (IMPORTANT) in the CExtPopupMenuWnd::ItemInsertCommand() method