怎样用回车把焦点从一个编辑框切换到下一个编辑框?
BOOL CWelcomeDlg::PreTranslateMessage(MSG* pMsg)
{
if((pMsg->wParam==WM_KEYDOWN) && (pMsg->lParam == VK_RETURN)) {
CWnd *m_curWnd = GetFocus(); if(m_curWnd != NULL) {
CWnd *m_nextTable = GetNextDlgTabItem(m_curWnd);
m_nextTable->SetFocus(); }
return true;
}
return CDialog::PreTranslateMessage(pMsg);
}
这样写哪里有问题?