Partager via


CMFCFontComboBox Class

The CMFCFontComboBox class creates a combo box control that contains a list of fonts.

class CMFCFontComboBox : public CComboBox

Members

Public Constructors

Name

Description

CMFCFontComboBox::CMFCFontComboBox

Constructs a CMFCFontComboBox object.

CMFCFontComboBox::~CMFCFontComboBox

Destructor.

Public Methods

Name

Description

CMFCFontComboBox::CompareItem

Called by the framework to determine the relative position of a new item in the sorted list box of the current font combo box control. (Overrides CComboBox::CompareItem.)

CMFCFontComboBox::DrawItem

Called by the framework to draw a specified item in the current font combo box control. (Overrides CComboBox::DrawItem.)

CMFCFontComboBox::GetSelFont

Retrieves information about the currently selected font.

CMFCFontComboBox::MeasureItem

Called by the framework to inform Windows of the dimensions of the list box in the current font combo box control. (Overrides CComboBox::MeasureItem.)

CMFCFontComboBox::PreTranslateMessage

Translates window messages before they are dispatched to the TranslateMessage and DispatchMessage Windows functions. (Overrides CWnd::PreTranslateMessage.)

CMFCFontComboBox::SelectFont

Selects the font that matches the specified criteria from the font combo box.

CMFCFontComboBox::Setup

Initializes the list of items in the font combo box.

Data Members

Name

Description

CMFCFontComboBox::m_bDrawUsingFont

Indicates to the framework which font to use to draw the item labels in the current font combo box.

Remarks

To use a CMFCFontComboBox object in a dialog box, add a CMFCFontComboBox variable to the dialog box class. Then in the OnInitDialog method of the dialog box class, call the CMFCFontComboBox::Setup method to initialize the list of items in the combo box control.

Inheritance Hierarchy

CObject

   CCmdTarget

      CWnd

         CComboBox

            CMFCFontComboBox

Requirements

Header: afxfontcombobox.h

See Also

Reference

Hierarchy Chart

CMFCToolBarFontComboBox Class

CMFCFontInfo Class

Other Resources

MFC Classes