没有显示MFC CMenu工具提示
MFC CMenu tooltip not being displayed
我尝试使用这样的东西来设置CMenu项的工具提示(如这里所述),但它只是显示在单行中,换行符不可见。
// read control id
UINT id = menu->GetMenuItemID(1235);
// modify caption and add tooltip?
menu->ModifyMenu( id, MF_BYCOMMAND, id, "Click herenThis is the tooltip for the menu item ...");
我还尝试在菜单项的visual studio资源设计器中直接设置标题,效果相同。你能给我提示一下什么地方不对吗?我在windows 7上使用VS2008。
任何帮助都是感激的!
也许您还没有在您的应用程序中添加windows xp常用控件。
尝试将常用控件添加到stdafx.h:
#ifdef UNICODE
#if defined _M_IX86
#pragma comment(linker,"/manifestdependency:"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'"")
#elif defined _M_IA64
#pragma comment(linker,"/manifestdependency:"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'"")
#elif defined _M_X64
#pragma comment(linker,"/manifestdependency:"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'"")
#else
#pragma comment(linker,"/manifestdependency:"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'"")
#endif
#endif
看起来像一个副本
主要是你应该使用rn而不是n,因为这是mfc期望的。
相关文章:
- 如何在动态创建的CMFCToolbar的工具提示中添加描述?
- 添加带有 QSyntaxHighlight 和 QTextCharFormat 的工具提示
- CScrollView 中的跟踪工具提示?
- 当鼠标悬停在 MFC C++ 中列表控件的列标题上时,可视显示工具提示
- 在 MFC C++中悬停列表控件的列标题的可视化显示工具提示
- 无法隐藏工具提示
- 更新模型/视图方案中 QXXXView (QTableView, QTreeView,..) 元素的显示工具提示
- 在运行时设置 CMenu 项提示
- 将工具提示添加到 ComboBoxEx 失败
- 如何在 c++/cli 中增加工具提示的大小
- QT 4.7-在OS X 10.12下,工具提示和Qcombobox弹出窗口空白
- QLineEdit:如果鼠标悬停,则显示超长文本作为工具提示
- Visual studio调试工具提示-隐藏变量
- C++Listview工具提示
- 鼠标悬停在TableView上时显示工具提示
- 如何在Qt的子小部件中忽略父小部件的工具提示?
- 如何在QToolbar上禁用工具提示
- 如何显示动态工具提示
- 如何在C++Builder中长时间显示工具提示
- 没有显示MFC CMenu工具提示