重写PreTranslateMessage函数:
BOOL CEeeDlg::PreTranslateMessage(MSG* pMsg)
{
if (pMsg->wParam==VK_RETURN && pMsg->message==WM_KEYDOWN )
{
CWnd* pWnd=GetFocus();
ASSERT(pWnd);
if(pWnd)
{
if (pWnd->GetDlgCtrlID()==IDC_EDIT1)
{
MessageBox("hui che");
}
}
}
else
return CDialog::PreTranslateMessage(pMsg);
}
BOOL CEeeDlg::PreTranslateMessage(MSG* pMsg)
{
if (pMsg->wParam==VK_RETURN && pMsg->message==WM_KEYDOWN )
{
CWnd* pWnd=GetFocus();
ASSERT(pWnd);
if(pWnd)
{
if (pWnd->GetDlgCtrlID()==IDC_EDIT1)
{
MessageBox("hui che");
}
}
}
else
return CDialog::PreTranslateMessage(pMsg);
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货