Export (0) Print
Expand All
Expand Minimize

GetThemeBackgroundRegion function

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

Syntax


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

Parameters

hTheme [in]

Type: HTHEME

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

hdc [in]

Type: HDC

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

iPartId [in]

Type: int

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

iStateId [in]

Type: int

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

pRect [in]

Type: LPCRECT

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

pRegion [out]

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 XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Uxtheme.h

Library

UxTheme.lib

DLL

UxTheme.dll

See also

Reference
Property Identifiers
Other Resources
Regions

 

 

Community Additions

ADD
Show:
© 2014 Microsoft