- 1、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
vc为控件加tooltip工具提示方法总结(VC summarizes tooltip tooltips for controls)
vc为控件加tooltip工具提示方法总结(VC summarizes tooltip tooltips for controls)
VC summarizes ToolTip tooltips for controls
Here introduces two methods, the first method is relatively limited, only for the window of the control plus ToolTip prompt, the second method is universal, for any VC program space can add ToolTip prompt.
Method 1: add hints for controls on the window, such as buttons, text boxes, edit boxes, and so on. Heres a code introduction
1. first, define the ToolTip control prompt in the.H header file of CTestToolTipDlg (inherited from CDialog), such as: CToolTipCtrl, m_toolTip;
2. add the following code in the OnInitDialog () method:
EnableToolTips (TRUE);
If (... M_toolTip)
{
M_toolTip.Create (this);
M_toolTip.Activate (TRUE);
M_toolTip.AddTool (GetDlgItem (IDOK), _T (this is a button);
//IDC_BUTTON1 is the ID value of the button that needs prompt. The prototype of this function is
//BOOL, AddTool (CWnd*, pWnd, LPCTSTR, lpszText = LPSTR_TEXTCALLBACK, LPCRECT, lpRectTool = NULL, UINT_PTR, nIDTool = 0);
M_toolTip.SetTipTextColor (RGB (0,0255)); / / the text color, non essential
M_toolTip.SetDelayTime (150); / / delay time prior to presentation, non essential
}
3. add PreTranslateMessage messages for CTestToolTipDlg, and add the code as follows:
BOOL CTestToolTipDlg:: PreTranslateMessage (MSG*, pMsg)
{
TODO: Add your specialized code here / and/or call the base class
M_toolTip.RelayEvent (pMsg);
Return CDialog:: PreTranslateMessage (pMsg);
}
If you need the left mouse button to press, move, or bounce from the button, you can do the following changes:
BOOL CTestToolTipDlg:: PreTranslateMessage (MSG*, pMsg)
{
TODO: Add your specialized code here / and/or call the base class
If (pMsg-message== (WM_LBUTTONDOWN ||
PMsg-message== WM_LBUTTONUP ||
PMsg-message== WM_MOUSEMOVE)
PMsg-hwnd = GetDlgItem (IDOK) (-GetSafeHwnd))
{
MSG tempMsg;
TempMsg=*pMsg;
TempMsg.message=WM_MOUSEMOVE;
M_toolTip.RelayEvent (tempMsg);
}
返回CDialog::PreTranslateMessage(PMSG);
}
方法二:不仅可以为CDialog窗口类,而
您可能关注的文档
- c语言试卷4(C language test paper 4).doc
- da控制面板说明(DA control panel instructions).doc
- db2 环境 设置技巧篇(DB2 environment settings tips).doc
- dbgrid的实用技巧(Practical skills of DBGrid).doc
- c语言分析运行结果(更正)题库(C language analysis of running results (correction) question bank).doc
- c语言相机管理系统(C language camera management system).doc
- dde决策(DDE decision making).doc
- dcs中简单控制学习问答(Simple control learning question and answer in DCS).doc
- dds ad9850试用手记(dds ad9850试用手记).doc
- c语言试题(C language test questions).doc
- vba excel 排序(排序 vba excel).doc
- vc相关知识(VC relevant knowledge).doc
- vc常用项目参数设置比较(Comparison of VC common item parameter settings).doc
- vc第二章(VC second chapters).doc
- vfp 与其他开发工具的比较(Comparison of VFP with other development tools).doc
- vc知识库文章 - vc中基于 windows 的精确定时(VC knowledge base article - precise timing based on windows in VC).doc
- vf笔试汇总答案(VF written summary answer).doc
- vim command(vim命令).doc
- vim config(vim配置).doc
- vga3+43+53+63+73+83+9电脑电视连接线vga线信息(Vga3+43+53+63+73+83+9 computer, TV cable, VGA line information).doc
文档评论(0)