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 General Discussion » How to skip the built-in context menu shown on right click on dynamic control bar Collapse All
Subject Author Date
Vasilii Vas Dec 5, 2008 - 10:12 AM

Hello,



I am trying to skip  the built-in context menu shown on right click on dynamic control bar. I browse the forums and found the solution, that should suppress even all menus :



afx_msg LRESULT OnConstructPopupMenuCB( WPARAM wParam, LPARAM lParam );



ON_REGISTERED_MESSAGE(

    CExtControlBar::g_nMsgConstructPopupMenu,

    OnConstructPopupMenuCB

)

LRESULT CMainFrame::OnConstructPopupMenuCB(

    WPARAM wParam, LPARAM lParam )

    {

       wParam;

      lParam;

      return (!0);

    }



But it doesn’t work in my program neither in the sample SDI_DynamicBars. Maybe I am missing something. 



Thank you!

Technical Support Dec 8, 2008 - 9:20 AM

This works for simple control bars (CExtControlBar). In the case of dynamic control bars (CExtControlBar), you should implement the CExtDynamicControlBar::OnInitDbsMenu() virtual method that modifies or suppresses the dynamic control bar’s menu. If you set the CExtControlBar::m_bAppearInDockSiteControlBarPopupMenu property for any control bar to false, all built-in context menus displayed by Prof-UIS over frame window areas will not contain the menu item associated with this control bar. You can set the CExtControlBar::m_bAppearInDockSiteControlBarPopupMenu property of all the control bar in your project to false and built-in Prof-UIS context menus will not appear because they contain no menu items.