MFC CEidt获取焦点
MFC CEidt获取焦点
——————————————————————————————
BOOL CMMDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// Set the icon for this dialog. The framework does this automatically
// when the application 's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
// TODO: Add extra initialization here
/在这里添加代码设置让控件获得焦点
GetDlgItem(IDC_EDIT)-> SetFocus();
return FALSE; // *******important ************ return TRUE unless you set the focus to a control
}
浙公网安备 33010602011771号