Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
GetThemeTextMetrics
Collapse the table of content
Expand the table of content

GetThemeTextMetrics function

Retrieves information about the font specified by a visual style for a particular part.

Syntax


HRESULT GetThemeTextMetrics(
  _In_  HTHEME     hTheme,
  _In_  HDC        hdc,
  _In_  int        iPartId,
  _In_  int        iStateId,
  _Out_ TEXTMETRIC *ptm
);

Parameters

hTheme [in]

Type: HTHEME

Handle to a window's specified theme data. Use OpenThemeData to create an HTHEME.

hdc [in]

Type: HDC

HDC to use for screen context. This parameter may be set to NULL.

iPartId [in]

Type: int

Value of type int that specifies the part to retrieve font information about. See Parts and States.

iStateId [in]

Type: int

Value of type int that specifies the state of the part. See Parts and States.

ptm [out]

Type: TEXTMETRIC*

Receives the font information.

Return value

Type: HRESULT

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

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Uxtheme.h

Library

UxTheme.lib

DLL

UxTheme.dll

See also

Property Identifiers

 

 

Community Additions

ADD
Show:
© 2015 Microsoft