# SendDlgMessage

The SendDlgMessage function is used to send a message to the dialog callback function.

    LONG_PTR WINAPI SendDlgMessage(
      HANDLE hDlg,
      int    Msg,
      int    Param1,
      LONG_PTR Param2
    );

### Arguments

hDlg
Dialog handle
Msg
One of the Dialog API messages.
Param1
The 1st parameter.
Param2
The 2nd parameter.

### Return value

Return value depends on Msg value.

### Example

A fragment from the Reversi game dialog callback proc:

    LONG_PTR WINAPI ReversiDialogProc(HANDLE hDlg, int Msg,int Param1,LONG_PTR Param2)
    {
    ...
        case DN_INITDIALOG:
          //get element info
          Info.SendDlgMessage(hDlg,DM_GETDLGITEM,75,(LONG_PTR)&DialogItem);
          ListItems=DialogItem.ListItems->Items;
          ...
          NewGame(hDlg);
          return FALSE;
    ...
    }

See also:
DialogEx, DefDlgProc