Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Calculates the size and location of the background, defined by the visual style, given the content area.
HRESULT GetThemeBackgroundExtent(
[in] HTHEME hTheme,
[in] HDC hdc,
[in] int iPartId,
[in] int iStateId,
[in] LPCRECT pContentRect,
[out] LPRECT pExtentRect
);
[in] hTheme
Type: HTHEME
Handle to a window's specified theme data. Use OpenThemeData to create an HTHEME.
[in] hdc
Type: HDC
HDC to use when drawing. This parameter may be set to NULL.
[in] iPartId
Type: int
Value of type int that specifies the part that contains the content. See Parts and States.
[in] iStateId
Type: int
Value of type int that specifies the state of the part that contains the content. See Parts and States.
[in] pContentRect
Type: LPCRECT
Pointer to a RECT structure that contains the content background rectangle, in logical coordinates. This rectangle is returned from GetThemeBackgroundContentRect.
[out] pExtentRect
Type: LPRECT
Pointer to a RECT structure that receives the background rectangle, in logical coordinates. This rectangle is based on the pContentRect.
Type: HRESULT
If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
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.
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 |
Reference
Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register today