15,979
社区成员
发帖
与我相关
我的任务
分享
BOOL CMyDlg::PreTranslateMessage(MSG* pMsg)
{
if(pMsg->message==WM_LBUTTONUP) //如果是鼠标弹起
{
if(pMsg->hwnd == *GetDlgItem(IDC_Button1))//如果是在IDC_Button1这个按钮上弹起的
{
}
}
return CMyDlg::PreTranslateMessage(pMsg);
}
BOOL CMy11Dlg::PreTranslateMessage(MSG* pMsg)
{
// TODO: Add your specialized code here and/or call the base class
if(pMsg->message==WM_LBUTTONDOWN) //左键按下的时候
MessageBox("aa");
if(pMsg->message==WM_KEYDOWN) //键盘有按下的时候
MessageBox("b");
return CDialog::PreTranslateMessage(pMsg);
}