如何在菜单图标上添加评论 [英] how to add the comment to menu icon

查看:76
本文介绍了如何在菜单图标上添加评论的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



在某些应用程序(例如Msword)中,只要将鼠标指针停留在菜单图标上,它就会显示该图标的功能
例如:如果将鼠标指针保持在保存图标上,则注释显示为save ctrl + s.

我想在vc ++ 6.0版本的应用程序中执行相同的操作.
谁能帮我.


非常感谢您

Hi,

In some applications like Msword whenever you kept the mouse pointer on the menu icon it will show the functionality of that icon
for ex: if you kept mouse pointer on save icon it shows the comment as save ctrl+s.

I want to do the same in my application in vc++6.0 version.
can anyone help me please.


Thank u so much

推荐答案

[ ^ ]可能可以帮助您.
This[^] can probably help you out.


最简单的方法是使用字符串表.转到资源视图->字符串表,并添加一个ID与您的图标相同的字符串(与菜单ID相同),并给出类似tesxt1 \ ntext2
的文本 例如,保存菜单字符串将为

The simple way is to use string table.Go to resource view -> string table and add a string with ID same as your icon(same as menu id) and give the text like tesxt1\ntext2
For example for save menu string will be,

ID_FILE_SAVE        57603           Save the active document\nSave(Ctrl+s)



保存活动文档",如果将光标放在保存菜单项上,此文本将显示在状态栏中,而保存(Ctrl + s)"将是您的图标工具提示(以您的方式发表评论)

另一种方法是转到菜单编辑器,打开其属性,然后在prompt字段中输入上面的文本(保存活动文档\ nSave(Ctrl + s)).



"Save the active document", this text will be displayed in status bar if place the cursor on save menu item and "Save(Ctrl+s)" will be your icon tooltip(comment in your way)

One more method is go to menu editor open its properties and give the above(Save the active document\nSave(Ctrl+s)) text in prompt field.


使用Windows API的简单任务,但是如果您别无选择,那么此MSDN文章中的示例可能会有所帮助:
This is not an easy task using Windows API, but if you have no choice, then this MSDN article with samples may help: Using Tooltip Controls.


这篇关于如何在菜单图标上添加评论的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆