MFC彈出選單隱藏解決

小 樓 一 夜 聽 春 雨發表於2014-03-29

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.

相關文章