+ -
当前位置:首页 → 问答吧 → CStatic, CButton, CToolTipCtrl大家进来啊~

CStatic, CButton, CToolTipCtrl大家进来啊~

时间:2011-12-12

来源:互联网

我用CStatic Create了一个图片框,它的父窗口是一个CButton, 我想让CToolTipCtrl在CStatic 上面生效..请问怎么做?



我重载了 CButton 的 PreTranslateMessage .但是发现并没有调用这个函数...

作者: hhmxd   发布时间: 2011-12-12

999我啊~~

作者: hhmxd   发布时间: 2011-12-12

CStatic上怎能有CButton呢
从CBitmapButton派生

作者: franzhong   发布时间: 2011-12-12

引用 2 楼 franzhong 的回复:
CStatic上怎能有CButton呢
从CBitmapButton派生


我的意思是CStatic 的父窗口是CButton 呢~~

作者: hhmxd   发布时间: 2011-12-12

没人了吗?

作者: hhmxd   发布时间: 2011-12-12

原因应该不是PreTranslateMessage没被执行,它应该会被调用(我专门试了一下)。应该是因为tooltip不支持static控件,msdn中专门说了一句“You cannot set a tool tip to a static control using AddTool”

作者: iamshuke   发布时间: 2011-12-12

引用 5 楼 iamshuke 的回复:
原因应该不是PreTranslateMessage没被执行,它应该会被调用(我专门试了一下)。应该是因为tooltip不支持static控件,msdn中专门说了一句“You cannot set a tool tip to a static control using AddTool”


为什我Cbutton 的PreTranslateMessage没有被调用呢... 郁闷

作者: hhmxd   发布时间: 2011-12-12

引用 5 楼 iamshuke 的回复:
原因应该不是PreTranslateMessage没被执行,它应该会被调用(我专门试了一下)。应该是因为tooltip不支持static控件,msdn中专门说了一句“You cannot set a tool tip to a static control using AddTool”


对了Cstatic 可以用tooltip 的 只要弄成 notify

作者: hhmxd   发布时间: 2011-12-12