WM_NEXTDLGCTL

This message is sent to a dialog box's window function, to alter the control focus. The effect of this message is different than that of the SetFocus function because WM_NEXTDLGCTL modifies the border around the default button.

Parameter Description  

wParam If the lParam parameter is nonzero, the wParam parameter identifies the control that receives the focus. If lParam is zero, wParam is a flag that indicates whether the next or previous control with tab-stop style receives the focus. If wParam is zero, the next control receives the focus; otherwise, the previous control with tab-stop style receives the focus.  
lParam Contains a flag that indicates how Windows uses the wParam parameter. If the lParam parameter is nonzero, wParam is a handle associated with the control that receives the focus; otherwise, wParam is a flag that indicates whether the next or previous control with tab-stop style receives the focus.  

Comments

Do not use the SendMessage function to send a WM_NEXTDLGCTL message if your application will concurrently process other messages that set the control focus. Use the PostMessage function instead.