You should handle the CExtControlBar::g_nMsgConstructPopupMenu
registered message in your main frame class. This message allows you to rebuild or reconstruct any built-in Prof-UIS menus. For example, the ProfStudio sample application completely recreates all the built-in Prof-UIS menus. The CExtControlBar::g_nMsgConstructPopupMenu
message uses pointer to the CExtControlBar::POPUP_MENU_EVENT_DATA
data structure as WPARAM
parameter. This message is sent twice. First time, the CExtControlBar::POPUP_MENU_EVENT_DATA::m_bPostNotification
flag is set to false
and you can construct popup menu from scratch. Second time, this flag is set to true
and you can modify constructed by default menu. The CExtControlBar::POPUP_MENU_EVENT_DATA::m_nHelperNotificationType
property specifies the type of menu. The following enumeration is defined inside the CExtControlBar::POPUP_MENU_EVENT_DATA
class and specifies supported menu types:
enum // Prof-UIS notification types
{
__PMED_DOCKBAR_CTX = 0, // dockbar context menu
__PMED_CONTROLBAR_CTX = 1, // any control bar context menu (client area)
__PMED_CONTROLBAR_NC_CTX = 2, // any control bar context menu (non-client area)
__PMED_STATUSBAR_CTX = 3, // statusbar context menu
__PMED_AUTOHIDESLIDER_CTX = 4, // autohide slider window context menu
__PMED_MINIFRAME_NC_CTX = 5, // miniframe context menu (non-client area)
__PMED_MDICLIAREA_CTX = 6, // MDI client area context menu
__PMED_MDITABS_CTX = 7, // MDI-tabs window
__PMED_AUTOHIDETABS_CTX = 8, // autohide-tabs window
__PMED_DYNCBCTABS_CTX = 9, // dynamic control bar container tabs window
__PMED_CONTROLBAR_NCBTNMENU_TOP = 10, // control bar nc-area-menu-button - top level
__PMED_CONTROLBAR_NCBTNMENU_BARS = 11, // control bar nc-area-menu-button - control bars list
__PMED_CTXEXPBTN_TOP = 12, // content expand button - top level
__PMED_CTXEXPBTN_APPEND = 13, // content expand button - append to buttons list
__PMED_CTXEXPBTN_BARS = 14, // content expand button - control bars list
__PMED_CONTROLBAR_NCBTNMENU_DYNSTATE = 15, // dynamic resizable control bar nc-area-menu-button
__PMED_TAB_PAGE_CONTAINER_TABS_CTX = 16, // page-container-as-main-view-tabs window
};
The
Show or Hide Panels menu is constructed by the
CExtControlBar::POPUP_MENU_EVENT_DATA::__PMED_CONTROLBAR_NCBTNMENU_TOP
and
CExtControlBar::POPUP_MENU_EVENT_DATA::__PMED_CTXEXPBTN_APPEND
menus. First is menu button of floating toolbar. Second is chevron button. You can handle post-notifications of these menus and remove menu sub levels in them. The
CExtControlBar::POPUP_MENU_EVENT_DATA::m_pPopupMenuWnd
property specifies pointer to the popup sub menu you want to remove.
Finally, we would like to ask you why do you want to remove this built-in menu? We think it’s useful and don’t see any reasons to remove it.