Reputation: 2315
Have an MFC application that uses one of the various styles available that has a CMFCMenuBar
and toolbar. For the CMFCMenuBar
it only shows the items used, otherwise the double-down arrows have to be clicked to see the rest of the items. How do I set it up so it's just all items all the time, without the arrows having to be used?
TIA!!
Upvotes: 1
Views: 403
Reputation: 31609
It depends on how the menu is created and initialized. Look for the following code in CMainFrame
class:
CList<UINT, UINT> lstBasicCommands;
lstBasicCommands.AddTail(ID_FILE_NEW);
lstBasicCommands.AddTail(ID_FILE_OPEN);
...
CMFCToolBar::SetBasicCommands(lstBasicCommands);
If you find it, then remove the call to SetBasicCommands
Or keep SetBasicCommands
, and also add all the commands to lstBasicCommands
Upvotes: 3
Reputation: 11311
According to Microsoft, you should call
CMFCMenuBar::SetShowAllCommands(TRUE);
Upvotes: -1