CPropertySheet::MapDialogRect

Converts the dialog-box units of a rectangle to screen units.

void MapDialogRect(  
   LPRECT lpRect  
) const;

Parameters

  • lpRect
    Points to a RECT structure or CRect object that contains the dialog-box coordinates to be converted.

Remarks

Dialog-box units are stated in terms of the current dialog-box base unit derived from the average width and height of characters in the font used for dialog-box text. 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 Windows function returns size information for the system font, but you can specify a different font for each property sheet if you use the DS_SETFONT style in the resource-definition file. The MapDialogRect Windows function, described in the Windows SDK, uses the appropriate font for this dialog box.

The MapDialogRect member 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.

Requirements

Header: afxdlgs.h

See Also

Reference

CPropertySheet Class

Hierarchy Chart

WM_SETFONT