共用方式為


AFX_GLOBAL_DATA::SetMenuFont

Creates the specified logical font.

BOOL SetMenuFont(
   LPLOGFONT lpLogFont,
   BOOL bHorz
);

Parameters

  • [in] lpLogFont
    Pointer to a structure that contains the attributes of a font.

  • [in] bHorz
    TRUE to specify that the text runs horizontally; FALSE to specify that the text runs vertically.

Return Value

TRUE if this method succeeds; otherwise, FALSE. In debug mode, this method asserts if this method is unsuccessful.

Remarks

This method creates a horizontal regular font, an underlined font, and a bold font that is used in default menu items. This method optionally creates a regular vertical font. For more information about logical fonts, see CFont::CreateFontIndirect.

Requirements

Header: afxglobals.h

See Also

Reference

AFX_GLOBAL_DATA Structure

Hierarchy Chart

LOGFONT

CFont::CreateFontIndirect