Professional User Interface Suite, Copyright FOSS Software Inc. Help Published with Permission.

This feature is demonstrated 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.

If you want to disable the most recently used menu items, there are two ways to do this:

  •    add the following lines to your initialization code (this way is preferable.)
  • CExtPopupMenuWnd::g_bMenuExpanding = false;
    CExtPopupMenuWnd::g_bMenuHighlightRarely = false;
  •    use g_CmdManager->SetBasicCommands to make all your commands basic i.e. initially visible in your menus.