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 
} 

相关文章:

  • 2022-12-23
  • 2021-12-19
  • 2021-12-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-19
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-08
  • 2022-03-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案