SendDlgItemMessageA function

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

Syntax

LRESULT SendDlgItemMessageA(
  HWND   hDlg,
  int    nIDDlgItem,
  UINT   Msg,
  WPARAM wParam,
  LPARAM lParam
);

Parameters

hDlg

Type: HWND

A handle to the dialog box that contains the control.

nIDDlgItem

Type: int

The identifier of the control that receives the message.

Msg

Type: UINT

The message to be sent.

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

wParam

Type: WPARAM

Additional message-specific information.

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.

Requirements

   
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

See also

Conceptual

Dialog Boxes

Reference

SendMessage