赞
踩
BOOL CGMToolDlg::PreTranslateMessage(MSG* pMsg)
{
if(pMsg->message == WM_CHAR)
{
CEdit* pEdit = (CEdit*)GetDlgItem(IDC_EDIT)
if(pMsg->hwnd == pEdit->m_hWnd)
{
CString strText;
pEdit->GetWindowText(strText);
if((pMsg->wParam>='0'&&pMsg->wParam<='9'||pMsg->wParam=='\b'))
return CDialog::PreTranslateMessage(pMsg);
else
return true;
}
return CDialog::PreTranslateMessage(pMsg);
}
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。