Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This message is sent to a dialog box procedure to set the keyboard focus to a different control in the dialog box.

Syntax

WM_NEXTDLGCTL 
wCtlFocus = 
wParam; 

fHandle = (BOOL) LOWORD(
lParam);

Parameters

wCtlFocus

If the fHandleparameter is TRUE, the wCtlFocusparameter identifies the control that receives the focus. If fHandleis FALSE, wCtlFocusis a flag that indicates whether the next or previous control with the WS_TABSTOP style receives the focus. If wCtlFocusis zero, the next control receives the focus; otherwise, the previous control with the WS_TABSTOP style receives the focus.

fHandle

Boolean value that indicates how the system uses the wCtlFocusparameter. If the fHandleparameter is TRUE, wCtlFocusis a handle associated with the control that receives the focus; otherwise, wCtlFocusis a flag that indicates whether the next or previous control with the WS_TABSTOP style receives the focus.

Return Value

An application should return zero if it processes this message.

Remarks

The effect of this message differs from that of the SetFocusfunction because WM_NEXTDLGCTL modifies the border around the control.

Do not use the SendMessagefunction to send a WM_NEXTDLGCTL message if your application will concurrently process other messages that set the focus. Use the PostMessagefunction instead.

Requirements

Header winuser.h
Windows Embedded CE Windows CE 1.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also