Calculates the size and location of the theme-defined background given the content area.
Syntax
HRESULT GetThemeBackgroundExtent( HTHEME hTheme, int iPartId, int iStateId, const RECT *pContentRect, RECT *pExtentRect );
Parameters
- hTheme
- Handle to a window's specified theme data. Use OpenThemeData to create an HTHEME.
- iPartId
- Integer that specifies the part containing the content.
- iStateId
- Integer that specifies the state of the part containing the content.
- pContentRect
- [in] Pointer to a RECT structure that receives the content background rectangle, in logical coordinates. This rectangle is returned from GetThemeBackgroundContentRect.
- pExtentRect
- [out] Pointer to a RECT structure that contains the background rectangle, in logical coordinates. This rectangle is based on the pContentRect.
Return Value
Returns S_OK if successful, or an error value otherwise.
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.
Function Information
Stock Implementation UxTheme.dll Custom Implementation No Header ThemeApi.h Import library UxTheme.lib Minimum operating systems Windows NT Whistler