SendDlgItemMessageW function (winuser.h)
Sends a message to the specified control in a dialog box.
Syntax
LRESULT SendDlgItemMessageW(
[in] HWND hDlg,
[in] int nIDDlgItem,
[in] UINT Msg,
[in] WPARAM wParam,
[in] LPARAM lParam
);
Parameters
[in] hDlg
Type: HWND
A handle to the dialog box that contains the control.
[in] nIDDlgItem
Type: int
The identifier of the control that receives the message.
[in] Msg
Type: UINT
The message to be sent.
For lists of the system-provided messages, see System-Defined Messages.
[in] wParam
Type: WPARAM
Additional message-specific information.
[in] lParam
Type: LPARAM
Additional message-specific information.
Return value
Type: LRESULT
The return value specifies the result of the message processing and depends on the message sent.
Remarks
The SendDlgItemMessage function does not return until the message has been processed.
Using SendDlgItemMessage is identical to retrieving a handle to the specified control and calling the SendMessage function.
Examples
For an example, see Creating a Modeless Dialog Box.
Note
The winuser.h header defines SendDlgItemMessage as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | winuser.h (include Windows.h) |
Library | User32.lib |
DLL | User32.dll |
API set | ext-ms-win-ntuser-dialogbox-l1-1-0 (introduced in Windows 8) |
See also
Conceptual
Reference