CDialog::MapDialogRect

Syntax

void MapDialogRect( LPRECT lpRect ) const;

Parameters

lpRect

Points to a RECT structure that contains the dialog-box coordinates to be converted.

Remarks

Converts the dialog-box units of a rectangle 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 font used for dialog-box text.

Typically, dialog boxes use the system font, but a different font may be specified 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 Windows function GetDialogBaseUnits returns the dialog-box base units in pixels.

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.

See Also

::GetDialogBaseUnits, CDialog::Create, CDialog::CreateIndirect, WM_SETFONT