CFontHolder

This class encapsulates the functionality of a Windows CE font object and the IFont interface. It implements the stock Font property. Use this class to implement custom font properties for your control. CFontHolder does not have a base class.

At a Glance

Header file: Afxctl.h
Platforms: H/PC 2.0, Palm-size PC, H/PC Pro
Windows CE versions: 2.0 and later
Complete documentation: Visual C++ documentation

Remarks

Because Windows CE does not support the OleCreateFontIndirect function, MFC for Windows CE supports the m_pFont data member differently than it is supported in standard MFC.

The Windows CE version of the IFontDisp interface supports the same font properties, though not all the font property values, as the Windows-based desktop implementation supports. The following table shows the allowable data types for each font property in Windows CE.

Font property Supported values
Name VT_BSTR
Size VT_CY, VT_I2, VT_I4
Bold VT_BOOL
Italic BT_BOOL
Underline BT_BOOL
Strikethrough BT_BOOL
Weight VT_I2
Charset VT_I2

See Also

CPropExchange, ActiveX Type Wrappers