首页 > 学院 > 开发设计 > 正文

MFC 子窗体响应鼠标滚轮消息

2019-11-08 18:50:50
字体:
来源:转载
供稿:网友

MFC 子窗体响应鼠标滚轮消息

flyfish

在父窗口重写 PReTranslateMessage

BOOL CDlgX::PreTranslateMessage(MSG* pMsg){ if ( pMsg->message == WM_MOUSEWHEEL) { POINT pos; GetCursorPos(&pos); pMsg->hwnd = WindowFromPoint(pos)->GetSafeHwnd(); } return CDialog::PreTranslateMessage(pMsg);}
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表