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 » How to add/remove an item from the status bar context menu? Collapse All
Subject Author Date
Chun Pong Lau Jul 20, 2008 - 12:05 AM

Dear support team,


When I right click the status bar of a PROF-UIS application, there is a context menu showing each control bar,


when I click a control bar in this context menu, it will be shown again if it is hidden.


The question is how to add/remove a control bar from this menu. Thanks a lot.


Regards,


Chun Pong

Technical Support Jul 23, 2008 - 11:42 AM

If you need to hide some control bar from built-in Prof-UIS menus, you should set its CExtControlBar::m_bAppearInDockSiteControlBarPopupMenu property to false. You can also re-create or modify any built-in menus by handling the CExtControlBar::g_nMsgConstructPopupMenu registered message. As an example, you can use the ProfStudio, which replaces the most of built-in Prof-UIS menus with custom menus..

Chun Pong Lau Jul 23, 2008 - 1:46 PM

I tired to set CExtControlBar::m_bAppearInDockSiteControlBarPopupMenu to false in CMainFrame::OnCreate(),


but somewhere in PROF-UIS library it set it to true again.


Where should I set it actually?




Technical Support Jul 25, 2008 - 5:13 AM

The dynamic control bars represented by CExtDynControlBar can modify the CExtControlBar::m_bAppearInDockSiteControlBarPopupMenu property when state is loaded at run-time. The simple control bars represented by CExtControlBar never change this property. So, if you are using simple control bars, you should set the CExtControlBar::m_bAppearInDockSiteControlBarPopupMenu property to false anytime/anywhere after a CExtControlBar C++ object is instantiated. In the case of dynamic control bars, you should override the CExtControlBar::OnConstructDockSiteControlBarPopupMenu virtual method and simply return false from it. The latter method is also applicable to simple control bars.

Chun Pong Lau Jul 26, 2008 - 11:51 AM

Yes. They all work.