How to implement expandable menus?
You can take a look at how to do this in the DRAWCLI sample. When you open any menu from the menu bar, the only items that are visible at first correspond to basic commands. You will see other items when you click on the Expand button at the bottom of the menu or when you press the CTLT+DOWN_ARROW key combination. The frequently used or basic commands are those that do not depend on usage statistics or a number of clicks. All application commands are registered in the command manager (CExtCmdManager), whose members and methods can be accessed via the global smart pointer variable g_CmdManager with operator ->. The SetBasicCommands() method allows you to replenish the basic commands list. The system commands (from the window’s system menu), OLE commands and the commands relating to MRU files and to MDI windows are automatically considered to be basic.