Condividi tramite


CFontHolder Class

Implements the stock Font property and encapsulates the functionality of a Windows font object and the IFont interface.

class CFontHolder

Members

Public Constructors

Name

Description

CFontHolder::CFontHolder

Constructs a CFontHolder object.

Public Methods

Name

Description

CFontHolder::GetDisplayString

Retrieves the string displayed in a container's property browser.

CFontHolder::GetFontDispatch

Returns the font's IDispatch interface.

CFontHolder::GetFontHandle

Returns a handle to a Windows font.

CFontHolder::InitializeFont

Initializes a CFontHolder object.

CFontHolder::QueryTextMetrics

Retrieves information for the related font.

CFontHolder::ReleaseFont

Disconnects the CFontHolder object from the IFont and IFontNotification interfaces.

CFontHolder::Select

Selects a font resource into a device context.

CFontHolder::SetFont

Connects the CFontHolder object to an IFont interface.

Public Data Members

Name

Description

CFontHolder::m_pFont

A pointer to the CFontHolder object's IFont interface.

Remarks

CFontHolder does not have a base class.

Use this class to implement custom font properties for your control. For information on creating such properties, see the article ActiveX Controls: Using Fonts.

Inheritance Hierarchy

CFontHolder

Requirements

Header: afxctl.h

See Also

Reference

Hierarchy Chart

CPropExchange Class