void MapDialogRect(hDlg,lpRect)
This function converts the dialog-box units given in the lpRect parameter to screen units. Dialog-box units are stated in terms of the current dialog base unit derived from the average width and height of characters in the system font. One horizontal unit is one-fourth of the dialog base width unit, and one vertical unit is one-eighth of the dialog base height unit. The GetDialogBaseUnits function returns the dialog base units in pixels.
The MapDialogRect function replaces the dialog-box units in lpRect with screen units (pixels), so that the rectangle can be used to create a dialog box or position a control within a box.
Parameter | Type/Description |
hDlg | HWND Identifies a dialog box. | |
lpRect | LPRECT Points to a RECT data structure that contains the dialog-box coordinates to be converted. |
None.
The hDlg parameter must be created by using the CreateDialog or DialogBox function.