WM_NEXTDLGCTL message (Windows)

Switch View :
ScriptFree
WM_NEXTDLGCTL message

Applies to: desktop apps only

Sent to a dialog box procedure to set the keyboard focus to a different control in the dialog box.

#define WM_NEXTDLGCTL                   0x0028

Parameters

wParam

If lParam is TRUE, this parameter identifies the control that receives the focus. If lParam is FALSE, this parameter indicates whether the next or previous control with the WS_TABSTOP style receives the focus. If wParam is zero, the next control receives the focus; otherwise, the previous control with the WS_TABSTOP style receives the focus.

lParam

The low-order word indicates how the system uses wParam. If the low-order word is TRUE, 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.

Return value

An application should return zero if it processes this message.

Remarks

This message performs additional dialog box management operations beyond those performed by the SetFocus function WM_NEXTDLGCTL updates the default pushbutton border, sets the default control identifier, and automatically selects the text of an edit control (if the target window is an edit control).

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

Requirements

Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Header

Winuser.h (include Windows.h)

See also

Reference
PostMessage
SendMessage
SetFocus
Conceptual
Dialog Boxes

 

 

Send comments about this topic to Microsoft

Build date: 2/10/2012

Community Content

Joe Sixpack
wParam value

The wParam identifies the control by its hWnd, not its Id.

SendMessage(hdlg, WM_NEXTDLGCTL, (WPARAM)hwndControl, TRUE);


Đonny
Value
WM_NEXTDLGCTL = &H28