GetThemePartSize function (uxtheme.h)

Calculates the original size of the part defined by a visual style.

Syntax

HRESULT GetThemePartSize(
  [in]  HTHEME    hTheme,
  [in]  HDC       hdc,
  [in]  int       iPartId,
  [in]  int       iStateId,
  [in]  LPCRECT   prc,
  [in]  THEMESIZE eSize,
  [out] SIZE      *psz
);

Parameters

[in] hTheme

Type: HTHEME

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

[in] hdc

Type: HDC

HDC to select fonts into.

[in] iPartId

Type: int

Value of type int that specifies the part to calculate the size of. See Parts and States.

[in] iStateId

Type: int

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

[in] prc

Type: LPCRECT

Pointer to a RECT structure that contains the rectangle used for the part drawing destination. This parameter may be set to NULL.

[in] eSize

Type: THEMESIZE

Enumerated type that specifies the type of size to retrieve. See THEMESIZE for a list of type values.

[out] psz

Type: SIZE*

Pointer to a SIZE structure that receives the dimensions of the specified part.

Return value

Type: HRESULT

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

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

See also

Property Identifiers