BOOL CYourDlg::PreTranslateMessage(MSG* pMsg)
{
// 顺次传递焦点,除非当前焦点在确定按钮上时才响应触发消息
if((pMsg->message == WM_KEYDOWN) && (VK_RETURN == (int) pMsg->wParam))
{
if(GetFocus()->GetDlgCtrlID() != IDOK)
{
pMsg->wParam = VK_TAB;
}
}
return CDialog::PreTranslateMessage(pMsg);
}