Hello,
I am trying to disable the feature "Expand Submenu" Double Arrow (VS2010 MFC MDI Application) to display always the recently and all available menu commands, so the user does not need to click the Double Arrow first to open the menu items. I added the following calls in the CMainFrame::OnCreate function:
I am trying to disable the feature "Expand Submenu" Double Arrow (VS2010 MFC MDI Application) to display always the recently and all available menu commands, so the user does not need to click the Double Arrow first to open the menu items. I added the following calls in the CMainFrame::OnCreate function:
m_wndMenuBar.SetShowAllCommands( TRUE ); m_wndMenuBar.SetRecentlyUsedMenus( TRUE );
But this doesn't help, because in the
void CMFCMenuBar::OnChangeHot(int iHot)
function the flag m_bShowAllCommands is reset to FALSE.
I can derive my own menubar class from CMFCMenuBar and override the OnChangeHot function and set the flag to TRUE after calling the OnChange base class function (than it works as wanted), but is this the intended way?
Thanks,
You don't want the "intellegent menus" feature, some menu items are hidden, and you have to click to show the whole menu?
To disable this feature, go to CMainFrame::OnCreate. You will see some code like this:
// enable menu personalization (most-recently used commands) // TODO: define your own basic commands, ensuring that each pulldown menu has at least one basic command. CList<UINT, UINT> lstBasicCommands; lstBasicCommands.AddTail(ID_FILE_NEW); lstBasicCommands.AddTail(ID_FILE_OPEN); ... lstBasicCommands.AddTail(ID_SORTING_GROUPBYTYPE); CMFCToolBar::SetBasicCommands(lstBasicCommands);
Remove it.
Yes, thanks, that's what I was looking for.