CFont::FromHandle

static CFont* PASCAL FromHandle( HFONT hFont );

Return Value

A pointer to a CFont object if successful; otherwise NULL.

Parameters

hFont

An HFONT handle to a Windows font.

Remarks

Returns a pointer to a CFont object when given an HFONT handle to a Windows GDI font object. If a CFont object is not already attached to the handle, a temporary CFont object is created and attached. This temporary CFont object is valid only until the next time the application has idle time in its event loop, at which time all temporary graphic objects are deleted. Another way of saying this is that the temporary object is valid only during the processing of one window message.

CFont OverviewClass MembersHierarchy Chart