Share via


DrawThemeBackground (Windows Embedded CE 6.0)

1/6/2010

This function draws the themed background image for the specified control part.

Syntax

HRESULT DrawThemeBackground(
  HTHEME hTheme,
  HDC hdc,
  int iPartId,
  int iStateId,
  const RECT* pRect,
  const RECT* pClipRect
);

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
  • iPartId
    [in] Integer value that specifies the part to draw. For more information, see Theme Parts and States
  • iStateId
    [in] Integer value that specifies the state of the part to draw. For more information, see Theme Parts and States
  • pRect
    [in] Pointer to a RECT structure that contains the logical coordinates of the rectangle in which the background image is drawn.
  • pClipRect
    [in] Pointer to a RECT structure that contains a clipping rectangle. This parameter is optional and may be set to NULL

Return Value

Returns S_OK if successful, or E_FAIL otherwise.

Remarks

Drawing operations are scaled to fit and not to exceed the rectangle specified in pRect. Your application should not draw outside the rectangle specified by pClipRect.

The background defined by the visual style can be based on a bitmap file, a border, or a fill pattern.

Requirements

Header uxtheme.h
Library Ietheme.dll
Windows Embedded CE Windows CE 5.0 and later

See Also

Concepts

Theme Support Reference

Other Resources

Theme Support Functions