The question was posted (and encoded) in Traditional Chinese. In English, it can be translated as "How to capture the 'Enter key' hit on an Edit Control" My suggested solution would be to use PreTransMessage() and do something like the following;
BOOL CMyDlg::PreTranslateMessage(MSG *pMsg)
{
int ctrlID;
if (pMsg->message == WM_KEYDOWN)
if (pMsg->wParam == VK_RETURN)
{
ctrlID = (GetFocus())->GetDlgCtrlID();
if (ctrlID == IDC_MYEDIT)
// do your stuff here
return true;
}
return CDialog::PreTranslateMessage(pMsg);
}
Hope it helps