DrawThemeBackgroundEx function (uxtheme.h)

[DrawThemeBackgroundEx is available for use in the operating

systems specified in the Requirements section. It may be altered or unavailable in

subsequent versions.]

Draws the background image defined by the visual style for the specified control part.

Syntax

HRESULT DrawThemeBackgroundEx(
  [in] HTHEME         hTheme,
  [in] HDC            hdc,
  [in] int            iPartId,
  [in] int            iStateId,
  [in] LPCRECT        pRect,
  [in] const DTBGOPTS *pOptions
);

Parameters

[in] hTheme

Type: HTHEME

Handle to a window's specified theme data. Use OpenThemeData to create an HTHEME.

[in] hdc

Type: HDC

HDC used for drawing the theme-defined background image.

[in] iPartId

Type: int

Value of type int that specifies the part to draw. See Parts and States.

[in] iStateId

Type: int

Value of type int that specifies the state of the part to draw. See Parts and States.

[in] pRect

Type: const RECT*

Pointer to a RECT structure that contains the rectangle, in logical coordinates, in which the background image is drawn.

[in] pOptions

Type: const DTBGOPTS*

Pointer to a DTBGOPTS structure that contains clipping information. This parameter may be set to NULL.

Return value

Type: HRESULT

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

Drawing operations are scaled to fit and to not exceed the rectangle specified in pRect.

Requirements

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