MFC弹出菜单隐藏解决

时间:2022-12-15 00:03:36

http://social.msdn.microsoft.com/Forums/en-US/5482103e-272b-4c9f-bac4-be15f14782bd/cmfcmenubar-remove-expand-submenu-double-arrow-display-recently-and-all-available-menu-commands?forum=vcmfcatl

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.