Events
Apr 8, 3 PM - May 28, 7 AM
Sharpen your AI skills and enter the sweepstakes to win a free Certification exam
Register now!This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Sends a message to the specified control in a dialog box.
LRESULT SendDlgItemMessageA(
[in] HWND hDlg,
[in] int nIDDlgItem,
[in] UINT Msg,
[in] WPARAM wParam,
[in] LPARAM lParam
);
[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.
Type: LRESULT
The return value specifies the result of the message processing and depends on the message sent.
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.
For an example, see Creating a Modeless Dialog Box.
Note
The winuser.h header defines SendDlgItemMessage as an alias that 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 is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
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) |
Conceptual
Reference
Events
Apr 8, 3 PM - May 28, 7 AM
Sharpen your AI skills and enter the sweepstakes to win a free Certification exam
Register now!