GetThemeSysFont function (uxtheme.h)

Retrieves the LOGFONT of a system font.

Syntax

HRESULT GetThemeSysFont(
  [in]  HTHEME   hTheme,
  [in]  int      iFontId,
  [out] LOGFONTW *plf
);

Parameters

[in] hTheme

Type: HTHEME

Handle to theme data.

[in] iFontId

Type: int

Value of type int that specifies a system font. May be one of the following values.

Value Meaning
TMT_CAPTIONFONT
The font used by window captions.
TMT_SMALLCAPTIONFONT
The font used by window small captions.
TMT_MENUFONT
The font used by menus.
TMT_STATUSFONT
The font used in status messages.
TMT_MSGBOXFONT
The font used to display messages in a message box.
TMT_ICONTITLEFONT
The font used for icons.

[out] plf

Type: LOGFONTW*

Pointer to a LOGFONT structure that receives the font information from this function.

Return value

Type: HRESULT

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

This function requires vssym32.h and uxtheme.h.

If the theme data handle is not a NULL handle, this function returns the desired LOGFONT from the SysMetrics section of the visual style. If the theme data handle is NULL, the function returns the value of the global system metric of the same type.

The font is scaled in dots per inch for the current logical screen.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header uxtheme.h
Library UxTheme.lib
DLL UxTheme.dll