CFontHolder::GetFontHandle

HFONT GetFontHandle( );

HFONT GetFontHandle( long cyLogical, long cyHimetric );

Return Value

A handle to the Font object; otherwise NULL.

Parameters

cyLogical

Height, in logical units, of the rectangle in which the control is drawn.

cyHimetric

Height, in MM_HIMETRIC units, of the control.

Remarks

Call this function to get a handle to a Windows font.

The ratio of cyLogical and cyHimetric is used to calculate the proper display size, in logical units, for the font’s point size expressed in MM_HIMETRIC units:

Display size = (cyLogical / cyHimetric) X font size

The version with no parameters returns a handle to a font sized correctly for the screen.

CFontHolder OverviewClass MembersHierarchy Chart