GetThemeBackgroundExtent (Windows CE 5.0)
This function calculates the size and location of the specified themed background, given the content area.
HRESULT GetThemeBackgroundExtent( HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT* pContentRect, const RECT* pExtentRect );
- [in] Handle to a window's specified theme data. To create a theme data handle, use OpenThemeDataEx.
- [in] Handle to a device context (HDC) used for drawing the background image. This parameter is optional and may be set to NULL.
- [in] Integer value that specifies the part that contains the content. For more information, see Theme Parts and States.
- [in] Integer value that specifies the state of the part that contains the content. For more information, see Theme Parts and States.
- [in] Pointer to a RECT structure that contains the rectangle, in logical coordinates, in which the background image is drawn.
- [out] Pointer to a RECT structure that receives the logical coordinates of the background rectangle. This rectangle is based on pContentRect.
Returns S_OK if successful, or E_FAIL otherwise.
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.
MSHTML passes the logical coordinates of the bounding rectangle in RECT. RECT is modified by GetThemeBackgroundExtent and returned in pExtentRect.
OS Versions: Windows CE 5.0 and later.
Link Library: Ietheme.dll.
Send Feedback on this topic to the authors