WM_NEXTDLGCTL
wCtlFocus = wParam; /* identifies control for focus */
fHandle = (BOOL) LOWORD(lParam); /* wParam handle flag */
An application sends the WM_NEXTDLGCTL message to a dialog box procedure to set the focus to a different control in a dialog box.
wCtlFocus
Value of wParam. If the fHandle parameter is nonzero, the wCtlFocus parameter is the handle of the control that receives the focus. If fHandle is zero, wCtlFocus is a flag that indicates whether the next or previous control with the WS_TABSTOP style receives the focus. If wCtlFocus is zero, the next control receives the focus; otherwise, the previous control with the WS_TABSTOP style receives the focus.
fHandle
Low-order word of lParam. Indicates how Windows uses the wParam parameter. If fHandle 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 the WS_TABSTOP style receives the focus.
An application should return zero if it processes this message.
The effect of this message differs from that of the SetFocus function because WM_NEXTDLGCTL modifies the border around the default button.
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. In this case, use the PostMessage function instead.