对话框列表控件的MFC工具提示 [英] MFC tooltip for list control of dialog box

查看:93
本文介绍了对话框列表控件的MFC工具提示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在应用程序上进行了开发,该应用程序显示了一个带有两个列表控件的对话框. 在此列表控件中,我正在显示图像.现在我想要的是,当我们从对话框的列表控件中将鼠标移到图像上时,它将为此显示工具提示.

I have developed on application, which shows a dialog box with two list controls. In this list control, I am showing images. Now I want is, when we move the mouse on images from the list control of dialog box, It will show tool tip for that.

如何在对话框的列表控件中显示图像的工具提示?

How can I show tool tips for images in a list control in a dialog box?

推荐答案

CToolTipCtrl控件是Win32工具提示"周围的MFC包装器类.您可以使用它来显示一个小的弹出窗口,以描述另一个控件或在您的应用程序中提供其他信息.

The CToolTipCtrl control is the MFC wrapper class around the Win32 "tool tip". You can use this to display a small pop-up window to describe another control or provide additional information in your app.

如果您使用的是ListBox控件,请浏览以下示例项目之一,以了解如何显示该ListBox控件中显示的各个项目的工具提示:

If you're using a ListBox control, explore one of these sample projects to see how to display tooltips for individual items displayed within that ListBox control:

  • ListBox With ToolTip Support
  • List Box With ToolTips

如果您使用的是ListView控件( CListCtrl 在MFC中),那么您应该先阅读 GetToolTips函数的文档和相应的 SetToolTips函数.您还可以查看此示例ListView控件如何实现工具提示:

And if you're using a ListView control (CListCtrl in MFC), then you should start by reading the documentation for the GetToolTips function and the corresponding SetToolTips function. You can also check out how this sample ListView control implements tooltips:

这篇关于对话框列表控件的MFC工具提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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