jim97的blog
jim97的blog
<2007年9月>
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456

留言簿(8)

随笔分类

随笔档案

文章分类

文章档案

相册

收藏夹

人才网信息

公共信息资源网站

友人链接

搜索

最新评论

阅读排行榜

评论排行榜

 
VC知识库BLOG   首页  新随笔  联系  聚合  登录 
  随笔-18 文章-37 评论-44 Trackbacks-0

一: 定义全局变量 CToolTipCtrl  m_tooltip和CWnd* pwnd;//pwnd用来指定要显示控件的指针
二:在窗体的OnInitDialog()中或OnShowWindow()中创建m_tooltip.

    //创建m_tooltip
    m_tooltip.Create(pwnd);

   //将CToolTipCtrl与相应的控件对应起来
    m_tooltip.AddTool(pwnd,TTS_ALWAYSTIP);

   //设定文字的颜色
    m_tooltipSetTipTextColor(RGB(0,0,255));  
  //设定提示文字在控件上停留的时间
   m_tooltipSetDelayTime(150);             



三: 重载CTipTestDlg::PreTranslateMessage(MSG* pMsg)函数,增加如下代码:

    //如果m_tip[0]句柄不为空,就从主窗口中捕获消息,如WM_MOUSEMOVE,WM_LBUTTONDOWN等消息
      
 if(m_tooltip.m_hWnd!=NULL)
  m_tooltip.RelayEvent(pMsg);

4、捕获主窗口的WM_MOUSEMOVE消息,在CTipTestDlg::OnMouseMove(UINT nFlags, CPoint point)函数中增加如下代码:

  //鼠标在相应的控件上移动时显示提示文字
    m_tooltip.UpdateTipText("怎么样",pwnd);
posted on 2005-09-07 09:57 木子的blog 阅读(4299) 评论(3)  编辑 收藏
Comments
  • # re: 控件的提示文字的CToolTipCtrl的用法!
    ++
    Posted @ 2006-04-01 17:06
    精简啊,我照这个终于搞定m_tooltip了。哈哈
  • # re: 控件的提示文字的CToolTipCtrl的用法!
    ghvvhgkh
    Posted @ 2006-04-08 20:40
    huaigg
  • # re: 控件的提示文字的CToolTipCtrl的用法!
    同声传译翻译公司请教几个问题
    Posted @ 2007-09-16 12:58
    请教几个问题:1.有一个翻译项目需要用2002 Access version, 哪里能弄到.2.cold fusion environment ,另一个客户要求我们在cold fusion 环境下为他们汉化网站,如何实现. 3.they also need to localize the javascript (pull down top menu) and inc file (nav bar).他们还要求我们对javascript脚本和inc文件进行汉化,你是否懂这些东西,这样的东西进行汉化应如何报价,以什么为标准和数量依据进行报价.谢谢.  以下是客户的邮件原文:As I have mentioned before, the Chinese website will be a mini-version of the English site. The sitemap below is for Chinese website. We need to localize both words and graphic. Beside the side modules on the right, the diagram/table and graphic are all from collaterals as well. Also, most of the content in web and collaterals are repeated. Please review and provide a favourable quotaion with details working process, timeframe...... Moreover, I haven't seen the answer related to COLD FUSION. Does your engineer have full experience working in the cold fusion environment? Beside translating cfm files and graphic files, they also need to localize the javascript (pull down top menu) and inc file (nav bar).

    北京华译网翻译公司北京海淀区太阳园17号楼405室(北三环西路大钟寺东侧)邮编:100098
    E-mail:bjctn@vip.sina.com
    电话:010-82115893
标题  
姓名  
主页
验证码 *
内容   
  登录  使用高级评论  Top
[使用Ctrl+Enter键可以直接提交]