用PreTranslateMessage截取,过滤消息。
BOOL CMyDlg::PreTranslateMessage(MSG* pMsg)
{
// TODO: Add your specialized code here and/or call the base class
if (pMsg->message == WM_NCLBUTTONDOWN)
{
pMsg->message = WM_LBUTTONDOWN;
}
return CDialog::PreTranslateMessage(pMsg);
}