# DM_GETDLGRECT

The DM_GETDLGRECT allows to retrieve the screen coordinates of the dialog window.

### Param1

0

### Param2

Pointer to a SMALL_RECT structure that receives the dialog coordinates.

### Return

TRUE is returned if the data was retrieved successfully. If Param2 is NULL, FALSE is returned.

### Example

    struct InitDialogItem InitDlg[]={
    ...
    /*11*/  DI_USERCONTROL,9,4,32,11,0,0,DIF_NOFOCUS,0,"",
    ...
    };

    long WINAPI ReversiDialogProc(HANDLE hDlg, int Msg,int Param1,LONG_PTR Param2)
    {
    ...
        case DN_DRAWDLGITEM:
          if(Param1 == 11)
          {
            SMALL_RECT Rect;
            Info.SendDlgMessage(hDlg,DM_GETDLGRECT,0,(LONG_PTR)&Rect);
            ...
                  Info.Text(Rect.Left+DialogItem.X1+X*3,
                           Rect.Top+DialogItem.Y1+Y,
                          ColorsPanel[Y&1][X&1]|AddColor,
                          Face);
            ...
    ...
    }

See also:
DialogEx
DM_GETDLGITEM
DM_GETITEMPOSITION