• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

在MFC对话框的应用程序捕获复选框的MouseMove事件?

用户头像
it1352
帮助1

问题说明

我的应用程序是具有多个属性页的基于VC6 MFC对话框的应用程序.

My application is a VC6 MFC dialog based application with multiple property pages.

我必须捕获某个控件(例如Checkbox)上的mousemove事件.

I have to capture a mousemove event over a control, for example Checkbox.

如何在MFC中的复选框上捕获mousemove事件?

How can I capture the mousemove events over a checkbox in MFC?

正确答案

#1

感谢您的回复..我找到了一种获取应用程序mousemove事件的方法.

Thanks for your replies.. I found a way to get the mousemove event for my app.

WM_SETCURSOR Windows消息使鼠标移动.它返回控件和对话框的Cwnd指针.

WM_SETCURSOR windows message gets the mouse move. It returns the Cwnd pointer for a control and the dialog.

在下面找到我的代码.

Find my code below.

BOOL CMyDialog::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
{
CWnd* pWndtooltip = GetDlgItem(IDC_STATIC_TOOLTIP); 

if (pWnd != this)
{
    if  (IDC_SN_START_ON == pWnd->GetDlgCtrlID())
        pWndtooltip->ShowWindow(SW_SHOW);

}
else
    pWndtooltip->ShowWindow(SW_HIDE);   

SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW));


return true;

}

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /reply/detail/tanhcggigh
系列文章
更多 icon
同类精品
更多 icon
继续加载