DrawThemeBackgroundEx function

[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

THEMEAPI DrawThemeBackgroundEx(
  HTHEME         hTheme,
  HDC            hdc,
  int            iPartId,
  int            iStateId,
  LPCRECT        pRect,
  const DTBGOPTS *pOptions
);

Parameters

hTheme

Type: HTHEME

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

hdc

Type: HDC

HDC used for drawing the theme-defined background image.

iPartId

Type: int

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

iStateId

Type: int

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

pRect

Type: const RECT*

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

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

   
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