SendDlgItemMessage

  LONG SendDlgItemMessage(hwndDlg, idDlgItem, uMsg, wParam, lParam)    
  HWND hwndDlg; /* handle of dialog box */
  int idDlgItem; /* identifier of dialog box item */
  UINT uMsg; /* message to send */
  WPARAM wParam; /* first message parameter */
  LPARAM lParam; /* second message parameter */

The SendDlgItemMessage function sends a message to the specified dialog box item (control) in the given dialog box.

Parameters

hwndDlg

Identifies the dialog box that contains the dialog box item.

idDlgItem

Specifies the identifier of the dialog box item that will receive the message.

uMsg

Specifies the message to be sent.

wParam

Specifies additional message-dependent information.

lParam

Specifies additional message-dependent information.

Return Value

The return value specifies the result of the message processing and depends on the message sent.

Comments

The SendDlgItemMessage function does not return until the message has been processed.

Using SendDlgItemMessage is identical to retrieving a handle to the given dialog box item and calling the SendMessage function.

See Also

SendMessage