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.
case WM_SETFOCUS : SetFocus (hwndEdit) ; return 0 ;
--------------------------------------------------------------------------------
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.
SetFocus (hwndEdit) ;
return 0 ;
{
CDialog::OnSetFocus();
GetDlgItem(IDC_EDIT1)->SetFocus()
}