MFC : How to add tooltip in Cmenu items?(MFC:如何在 Cmenu 项目中添加工具提示?)
问题描述
如何为 CMenu 项添加工具提示?我找不到任何简单而有用的资源.请帮忙.谢谢...
How do you add tooltips for CMenu Items? I couldn't find any straightforward and helpful resource. Please help. Thanks...
推荐答案
最简单的方法是将多个字符串传递给菜单文本,由换行符分隔.
The easiest way is to pass multiple strings to the Menu text separated by newline characters.
这将自动使 CMenu 将文本的第二部分显示为菜单工具提示.
This will automagically make CMenu display the second part of the text as the menu tooltip.
例如,如果菜单项文本为单击此处",则将其更改为
e.g., If a menu item text is "Click here", change it to
"Click here
This is the tooltip for the menu item ..."
当然,如果你喜欢更高级/花哨的工具提示,那就试试吧
Of course, if you like more advanced/fancy tooltips, then try
http://www.tooltips.net/downloads.html
很容易实现,而且输出很酷
Its easy to implement, and the output is very cool
这篇关于MFC:如何在 Cmenu 项目中添加工具提示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:MFC:如何在 Cmenu 项目中添加工具提示?
基础教程推荐
- 如何部分禁用 cmake C/C++ 自定义编译器检查 2021-01-01
- 将不可复制的闭包对象传递给 std::function 参数 2021-01-01
- c++ STL设置差异 2022-01-01
- 如何在 C++ 中正确使用命名空间? 2022-01-01
- 如何更改 SysDateTimePick32 或 CDateTimeCtrl 的背景颜色? 2022-01-01
- C++:获取传递给函数的多维数组的行大小 2021-01-01
- 随机插入/删除的综合向量与链表基准 2022-01-01
- 提升 ASIO 流缓冲 2021-01-01
- 与 CAS 的原子交换(使用 gcc 同步内置函数) 2022-01-01
- 为什么我们不能使用“虚拟继承"?在 COM 中? 2022-01-01
