16,472
社区成员
发帖
与我相关
我的任务
分享
BOOL CXXXDlg::PreTranslateMessage(MSG* pMsg)
{
// TODO: Add your specialized code here and/or call the base class
CEdit* m_edit = (CEdit*)GetDlgItem(IDC_EDIT1);
if((GetFocus()==m_edit) && (pMsg->message == WM_CHAR))
{
if(pMsg->wParam>'9' || pMsg->wParam<'0')
{
return 1;
}
}
return CDialog::PreTranslateMessage(pMsg);
}