关于ctooltipctrl的一个问题 我在 对话框中,用 ctoolitipctrl 显示button控件的提示信息但是,当button灰掉时,tip出不来,请教高人解决!!! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 可能式PreTranslateMessage不调用了看看BSTButton 我看了好几天BSTButton了,也看得不是很懂 m_tip是类变量 CToolTipCtrl类型void CMyFormView::OnInitialUpdate() { EnableToolTips(TRUE); m_tip.Create(this, TTS_ALWAYSTIP);// m_tip.Activate(TRUE); m_tip.AddTool( &m_btnStart, "开始/继续测试" ); m_tip.AddTool( &m_btnPause, "暂停刷新" ); m_tip.AddTool( &m_btnStop, "停止测试" ); m_tip.AddTool( &m_btnClear, "测试数据清零" ); m_tip.Activate(TRUE);}当一个按钮灰掉时,鼠标在该按钮上移动时,不出现 tip,其他按钮正常出现提示信息 BOOL CPropDlg::PreTranslateMessage(MSG* pMsg) { // TODO: Add your specialized code here and/or call the base class MSG msg = *pMsg; msg.hwnd = (HWND)tip.SendMessage(TTM_WINDOWFROMPOINT, 0, (LPARAM)&msg.pt); CPoint pt = pMsg->pt; if (msg.message >= WM_MOUSEFIRST && msg.message <= WM_MOUSELAST) ::ScreenToClient(msg.hwnd, &pt); msg.lParam = MAKELONG(pt.x, pt.y); tip.RelayEvent(&msg); return CDialog::PreTranslateMessage(pMsg);} http://www.codeguru.com/controls/index.shtm 谢谢 cleverwyq(此人三无) 的方法问题已解决 打算做一个控制鼠标的程序!有关消息,hook,等等…… 利用ATL创建一个简单的带菜单栏的Activex控件 菜单刷新 对Modem的操作 为什么DIALOG类型的窗体不能响影WM_TIMER消息函数?????????????????????/ 朝闻道,夕死可矣 ——升级散分、深情告别及其他 这个问题有这么难吗?怎么没有人回答我? 关于dll导出共享变量的问题 那里有好的安装程序制作工具啊? 怎么提取中图片中的部分图片? 怎么用PreTranslateMessage函数截获最小化窗体的鼠标右键消息 VC初学者应该先学什么?
看看BSTButton
void CMyFormView::OnInitialUpdate()
{
EnableToolTips(TRUE);
m_tip.Create(this, TTS_ALWAYSTIP);
// m_tip.Activate(TRUE); m_tip.AddTool( &m_btnStart, "开始/继续测试" ); m_tip.AddTool( &m_btnPause, "暂停刷新" ); m_tip.AddTool( &m_btnStop, "停止测试" ); m_tip.AddTool( &m_btnClear, "测试数据清零" ); m_tip.Activate(TRUE);
}
当一个按钮灰掉时,鼠标在该按钮上移动时,不出现 tip,其他按钮正常出现提示信息
{
// TODO: Add your specialized code here and/or call the base class MSG msg = *pMsg;
msg.hwnd = (HWND)tip.SendMessage(TTM_WINDOWFROMPOINT, 0, (LPARAM)&msg.pt);
CPoint pt = pMsg->pt;
if (msg.message >= WM_MOUSEFIRST && msg.message <= WM_MOUSELAST)
::ScreenToClient(msg.hwnd, &pt);
msg.lParam = MAKELONG(pt.x, pt.y);
tip.RelayEvent(&msg);
return CDialog::PreTranslateMessage(pMsg);
}
问题已解决