0

I am working on Mfc application that contains ribbon and some toolbars. I made a CMFCToolBar dummy object to store all the icons from ribbon tabs and use it later.

I have hidden the dummy toolbar from the UI. but couldn't hide from customize dialog Toolbar Property Page. Image(untitled bar is the dummy toolbar)

I dont want the user to see the dummy toolbar in the property page. For this I have also made CMFCToolBarsCustomizeDialog extension and inherited the ShowToolBar Function but it is not working.

Code:

void ShowToolBar(CMFCToolBar* pToolBar, BOOL bShow)
    {
        this->m_pToolbarsPage->ShowToolBar(pToolBar, bShow);
    }
Fatima A.
  • 41
  • 13

1 Answers1

3

Simply override CMFCToolBar::AllowShowOnList and return FALSE.

BOOL CMyToolBar::AllowShowOnList() const 
{ 
  return FALSE;
}
xMRi
  • 14,982
  • 3
  • 26
  • 59