如题 给出例子 出口如何响应 WM_SetFocus 和WM_KillFocus

解决方案 »

  1.   

    WM_SETFOCUS Notification
    --------------------------------------------------------------------------------
    The WM_SETFOCUS message is sent to a window after it has gained the keyboard focus. 
    WM_KILLFOCUS Notification
    --------------------------------------------------------------------------------
    The WM_KILLFOCUS message is sent to a window immediately before it loses the keyboard focus. 
      

  2.   

           case   WM_SETFOCUS :
                  SetFocus (hwndEdit) ;
                  return 0 ;
      

  3.   

    这是SDK吧,MFC版本:void C***Dlg::OnSetFocus()
    {
    CDialog::OnSetFocus();
    GetDlgItem(IDC_EDIT1)->SetFocus()
    }