WM_SETFOCUS

This message is sent after a window gains the input focus.

Parameter Description  

wParam Contains the handle of the window that loses the input focus (may be NULL).  
lParam Is not used.  

Comments

To display a caret, an application should call the appropriate caret functions at this point.