Share via


How to Display Command Information in the Status Bar

OverviewHow Do I

When you run AppWizard to create the skeleton of your application, you can easily support a toolbar and a status bar. A single option in AppWizard supports both. When a status bar is present, the framework automatically provides helpful feedback as the user of your application moves the mouse through items in the menus. The framework automatically displays a prompt string in the status bar when the menu item is being selected. For example, when the user drags the mouse over the Cut item on the Edit menu, the framework might display “Cut the selection and put it on the Clipboard” in the message area of the status bar. The prompt helps the user understand the menu item’s purpose. This also works when the user clicks a toolbar button.

You can easily add to this status-bar help by defining prompt strings for the menu items that you add to the program. To do so, provide the prompt strings when you edit the properties of the menu item in the menu editor. The strings you define this way are stored in your application’s resource file; they have the same IDs as the commands they explain.

By default, AppWizard adds the ID for a standard prompt, “Ready,” which is displayed when the program is waiting for new messages. If you specify the Context-Sensitive Help option in AppWizard, the ID for a help prompt, “For Help, press F1,” is added to your application. This ID is AFX_IDS_IDLEMESSAGE.