您的位置:首页 > 其它

How to: Display Command Information in the Status Bar在状态栏中显示命令信息

2012-04-26 11:13 549 查看
When you run the Application Wizard to create the skeleton of your application, you can easily support a toolbar and a status bar. A single option in the Application Wizard 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, the Application Wizard 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 the Application Wizard, the ID for a help prompt, "For Help,
press F1," is added to your application. This ID is AFX_IDS_IDLEMESSAGE.

关键字: AFX_IDS_IDLEMESSAGE 资源串ID 命令ID
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐