我想在鼠标放置于按钮之上时显示按钮相关的信息提示,如”打开文件“,请问怎么下手呢?有相关的代码吗?谢谢!
解决方案 »
- ScrollWindow的最后一个参数
- DirectSho做的一个视频播放,如何实现从一个时间点跳到另一个时间点播放?还有就是STREAM_TIME要如何使用?
- 一个让我五一都很头痛的问题,通讯问题
- 关机时出错
- 对灰度图象不懂,奉上100分求教
- 急!在线等待,如何在程序中打开CHM帮助文档,控制其只打开一次,并在主程序退出时将其关闭
- 如何忽略WM_ENDSESSION和CTRL_LOGOFF_EVENT
- 有没有一个函数可以判断一个实例化的类的类型?
- 怎样得到系统中正在运行的所有进程
- 关于通信程序的问题
- 在一辅助线程中,CSocket ::Accept()已经进入阻塞,现在要停止关闭这个端口,怎么做?
- 怎样实现双数据库查询,急急急急(我我要做毕业论文的)
Res
The CToolTipCtrl class encapsulates the functionality of a "tool tip control," a small pop-up window that displays a single line of text describing the purpose of a tool in an application. A "tool" is either a window, such as a child window or control, or an application-defined rectangular area within a window's client area. A tool tip is hidden most of the time, appearing only when the user puts the cursor on a tool and leaves it there for approximately one-half second. The tool tip appears near the cursor and disappears when the user clicks a mouse button or moves the cursor off the tool.CToolTipCtrl provides the functionality to control the initial time and duration of the tool tip, the margin widths surrounding the tool tip text, the width of the tool tip window itself, and the background and text color of the tool tip. A single tool tip control can provide information for more than one tool.The CToolTipCtrl class provides the functionality of the Windows common tool tip control. This control (and therefore the CToolTipCtrl class) is available only to programs running under Windows 95/98 and Windows NT versions 3.51 and later.For more information about enabling tool tips, see Tool Tips in Windows not Derived from CFrameWnd.For more information on using CToolTipCtrl, see Controls and Using CToolTipCtrl.Requirements
Header: afxcmn.h
2. 用m_tt.AddTool(..)添加按钮提示
3. 在父窗口类的PreTranslateMessage中添加
m_tt.RelayEvent(pMsg);例子程序
http://my.6to23.com/cigarette/dd8.zip