SendDlgItemMessage function (Windows)

Switch View :
ScriptFree
SendDlgItemMessage function

Applies to: desktop apps only

Sends a message to the specified control in a dialog box.

Syntax

LRESULT WINAPI SendDlgItemMessage(
  __in  HWND hDlg,
  __in  int nIDDlgItem,
  __in  UINT Msg,
  __in  WPARAM wParam,
  __in  LPARAM lParam
);

Parameters

hDlg [in]

Type: HWND

A handle to the dialog box that contains the control.

nIDDlgItem [in]

Type: int

The identifier of the control that receives the message.

Msg [in]

Type: UINT

The message to be sent.

For lists of the system-provided messages, see System-Defined Messages.

wParam [in]

Type: WPARAM

Additional message-specific information.

lParam [in]

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.

Requirements

Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Header

Winuser.h (include Windows.h)

Library

User32.lib

DLL

User32.dll

Unicode and ANSI names

SendDlgItemMessageW (Unicode) and SendDlgItemMessageA (ANSI)

See also

Reference
SendMessage
Conceptual
Dialog Boxes

 

 

Send comments about this topic to Microsoft

Build date: 2/10/2012

Community Content

Mat Diesel
List of system messages
A complete list of system messages is found on the following page: http://msdn.microsoft.com/en-us/library/ms644927.aspx#system_defined

Thomas Lee
where are the messages?
I believe it would be very useful to have a link to all the messages available or at least the most populiar..