为手工添加MFC PreTranslateMessage 重载
2010-06-06 23:31
323 查看
在头文件中加
public:
virtual BOOL PreTranslateMessage(MSG* pMsg);
然后在cpp 文件中重写
BOOL CGetcwndDlg::PreTranslateMessage(MSG* pMsg)
{
// TODO: Add your specialized code here and/or call the base class
if (pMsg->message==WM_MOUSEMOVE)
{
CPoint point(LOWORD(pMsg->lParam),HIWORD(pMsg->lParam));
OnMouseMove(0,point);
}
return CDialog::PreTranslateMessage(pMsg);
}
public:
virtual BOOL PreTranslateMessage(MSG* pMsg);
然后在cpp 文件中重写
BOOL CGetcwndDlg::PreTranslateMessage(MSG* pMsg)
{
// TODO: Add your specialized code here and/or call the base class
if (pMsg->message==WM_MOUSEMOVE)
{
CPoint point(LOWORD(pMsg->lParam),HIWORD(pMsg->lParam));
OnMouseMove(0,point);
}
return CDialog::PreTranslateMessage(pMsg);
}
相关文章推荐
- 在MFC中手动添加消息处理函数PreTranslateMessage
- 在MFC中手动添加消息处理函数PreTranslateMessage和自定义消息
- 在MFC中手动添加消息处理函数PreTranslateMessage和自定义消息
- 在MFC中手动添加消息处理函数PreTranslateMessage
- 让MFC DLL 中的窗口响应PreTranslateMessage
- MFC消息截获之pretranslatemessage
- 在MFC中如何使用PreTranslateMessage
- MFC使用PreTranslateMessage实现键盘监听
- Dll中重载PreTranslateMessage(转)
- MFC中PreTranslateMessage的实现
- VC重载PreTranslateMessage事件实现鼠标双击
- mfc PreTranslateMessage() 收不到SendMessage信息
- 基于对话框的MFC程序中捕捉WM_KEYDOWN消息的方法----PreTranslateMessage(MSG* pMsg) 转帖
- MFC PreTranslateMessage
- MFC中PretranslateMessage的实现
- VC重载PreTranslateMessage事件实现鼠标双击
- 让MFC DLL 中的窗口响应PreTranslateMessage
- MFC中PretranslateMessage的实现
- MFC中PretranslateMessage的实现
- MFC中的PreTranslateMessage