Share via


GetThemeBackgroundExtent (Windows CE 5.0)

Send Feedback

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);

Parameters

  • hTheme
    [in] Handle to a window's specified theme data. To create a theme data handle, use OpenThemeDataEx.
  • hdc
    [in] Handle to a device context (HDC) used for drawing the background image. This parameter is optional and may be set to NULL.
  • iPartId
    [in] Integer value that specifies the part that contains the content. For more information, see Theme Parts and States.
  • iStateId
    [in] Integer value that specifies the state of the part that contains the content. For more information, see Theme Parts and States.
  • pContentRect
    [in] Pointer to a RECT structure that contains the rectangle, in logical coordinates, in which the background image is drawn.
  • pExtentRect
    [out] Pointer to a RECT structure that receives the logical coordinates of the background rectangle. This rectangle is based on pContentRect.

Return Values

Returns S_OK if successful, or E_FAIL 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.

MSHTML passes the logical coordinates of the bounding rectangle in RECT.RECT is modified by GetThemeBackgroundExtent and returned in pExtentRect.

Requirements

OS Versions: Windows CE 5.0 and later.
Header: Uxtheme.h.
Link Library: Ietheme.dll.

See Also

Theme Support Reference

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.