MapDialogRect

2.x

  void MapDialogRect(hwndDlg, lprc)    
  HWND hwndDlg; /* handle of dialog box */
  RECT FAR* lprc; /* address of structure with rectangle */

The MapDialogRect function converts (maps) the specified dialog box units to screen units (pixels).

Parameters

hwndDlg

Identifies a dialog box. This dialog box must have been created by using the CreateDialog or DialogBox function.

lprc

Points to a RECT structure that contains the dialog box coordinates to be converted. The RECT structure has the following form:

typedef struct tagRECT {    /* rc */
   int left;
   int top;
   int right;
   int bottom;
} RECT;

For a full description of this structure, see the Microsoft Windows Programmer's Reference, Volume 3.

Return Value

This function does not return a value.

Comments

The MapDialogRect function converts the dialog box units of a rectangle to screen units. Dialog box units are defined in terms of the current dialog base unit, which is derived from the average width and height of characters in the font used for dialog box text. Typically, dialog boxes use the System font, but an application can specify a different font by using the DS_SETFONT style in the resource-definition file.

One horizontal unit is one-fourth of the dialog box base width unit, and one vertical unit is one-eighth of the dialog box base height unit. The GetDialogBaseUnits function retrieves the dialog box base units in pixels.

See Also

CreateDialog, DialogBox, GetDialogBaseUnits