对话框中按回车转到下一个控件,Tab
//利用default button void CDlgAddTest::OnOK() { if(GetFocus()->m_hWnd== GetDlgItem(IDOK)->m_hWnd){ MessageBox("stoped at ok."); } else{ GetNextDlgTabItem(GetFocus())->SetFocus(); } //CDialog::OnOK(); }
//利用default button void CDlgAddTest::OnOK() { if(GetFocus()->m_hWnd== GetDlgItem(IDOK)->m_hWnd){ MessageBox("stoped at ok."); } else{ GetNextDlgTabItem(GetFocus())->SetFocus(); } //CDialog::OnOK(); }