CMFCFontComboBox::Setup

Initialisiert die Liste der Elemente im Schriftartkombinationsfeld.

BOOL Setup(
   int nFontType=DEVICE_FONTTYPE|RASTER_FONTTYPE|TRUETYPE_FONTTYPE,
   BYTE nCharSet=DEFAULT_CHARSET,
   BYTE nPitchAndFamily=DEFAULT_PITCH 
);

Parameter

  • [in] nFontType
    Gibt den Schriftarttyp an.Der Standardwert ist die bitweise Kombination (OR) von DEVICE_FONTTYPE, von RASTER_FONTTYPE und von TRUETYPE_FONTTYPE.

  • [in] nCharSet
    Gibt den Schriftartzeichensatz an.Der Standardwert ist DEFAULT_CHARSET.

  • [in] nPitchAndFamily
    Gibt die Schriftartschriftbreite und -Familie an.Der Standardwert ist DEFAULT_PITCH.

Rückgabewert

TRUE, wenn das Schriftartkombinationsfeld erfolgreich initialisiert wurde; andernfalls FALSE.

Hinweise

Diese Methode initialisiert das Schriftartkombinationsfeld, indem sie die derzeit installierten Schriftarten auflistet, die die angegebenen Parameter und zum Einfügen dieser Schriftartnamen im Schriftartkombinationsfeld übereinstimmen.

Beispiel

Das folgende Beispiel zeigt, wie die Setup-Methode in der Klasse CMFCFontComboBox verwendet.Dieses Beispiel ist Teil Neue Kontrollprobe.

    CMFCFontComboBox m_wndFont;


...


    // specify the font type
    // BOOL m_bTrueType: true font type
    // BOOL m_bRaster: raster font type
    // BOOL m_bDeviceFont: device font type
    int nFontType = 0;

    if (m_bTrueType)
    {
        nFontType |= TRUETYPE_FONTTYPE;
    }

    if (m_bRaster)
    {
        nFontType |= RASTER_FONTTYPE;
    }

    if (m_bDeviceFont)
    {
        nFontType |= DEVICE_FONTTYPE;
    }

    CWaitCursor wait;
    m_wndFont.Setup(nFontType);

Anforderungen

Header: afxfontcombobox.h

Siehe auch

Referenz

CMFCFontComboBox-Klasse

Hierarchien-Diagramm

LOGFONT