Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

GetThemeBackgroundExtent function

Calculates the size and location of the background, defined by the visual style, given the content area.

Syntax


HRESULT GetThemeBackgroundExtent(
  _In_  HTHEME  hTheme,
  _In_  HDC     hdc,
  _In_  int     iPartId,
  _In_  int     iStateId,
  _In_  LPCRECT pContentRect,
  _Out_ LPRECT  pExtentRect
);

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 when drawing. This parameter may be set to NULL.

iPartId [in]

Type: int

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

iStateId [in]

Type: int

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

pContentRect [in]

Type: LPCRECT

Pointer to a RECT structure that contains the content background rectangle, in logical coordinates. This rectangle is returned from GetThemeBackgroundContentRect.

pExtentRect [out]

Type: LPRECT

Pointer to a RECT structure that receives the background rectangle, in logical coordinates. This rectangle is based on the pContentRect.

Return value

Type: HRESULT

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

Remarks

A theme can define a content area within each background image. This is the area where content such as text and icons can be placed without overwriting background borders.

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

Reference
Property Identifiers
GetThemeBackgroundContentRect

 

 

Community Additions

ADD
Show:
© 2015 Microsoft