GetThemeBackgroundRegion function

Computes the region for a regular or partially transparent background that is bounded by a specified rectangle.

Syntax

THEMEAPI GetThemeBackgroundRegion(
  HTHEME  hTheme,
  HDC     hdc,
  int     iPartId,
  int     iStateId,
  LPCRECT pRect,
  HRGN    *pRegion
);

Parameters

hTheme

Type: HTHEME

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

hdc

Type: HDC

HDC to draw into. The DC uses dots per inch (DPI) scaling. This parameter may be set to NULL.

iPartId

Type: int

Value of type int that specifies the part that contains the region. See Parts and States.

iStateId

Type: int

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

pRect

Type: LPCRECT

Pointer to a RECT structure that contains, in logical coordinates, the specified rectangle used to compute the region.

pRegion

Type: HRGN*

Pointer to the handle to the computed region.

Return Value

Type: HRESULT

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

Remarks

The region handle that is returned by this function should be released when it is no longer needed, using DeleteObject.

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

See Also

Other Resources

Property Identifiers

Reference

Regions