HitTestThemeBackground function (uxtheme.h)

Retrieves a hit test code for a point in the background specified by a visual style.

Syntax

HRESULT HitTestThemeBackground(
  [in]  HTHEME  hTheme,
  [in]  HDC     hdc,
  [in]  int     iPartId,
  [in]  int     iStateId,
  [in]  DWORD   dwOptions,
  [in]  LPCRECT pRect,
  [in]  HRGN    hrgn,
  [in]  POINT   ptTest,
  [out] WORD    *pwHitTestCode
);

Parameters

[in] hTheme

Type: HTHEME

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

[in] hdc

Type: HDC

HDC to use when drawing. This parameter may be set to NULL.

[in] iPartId

Type: int

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

[in] iStateId

Type: int

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

[in] dwOptions

Type: DWORD

DWORD that specifies the hit test options. See Hit Test Options for a list of options.

[in] pRect

Type: LPCRECT

Pointer to a RECT structure that contains, in logical coordinates, the rectangle that bounds the background.

[in] hrgn

Type: HRGN

Handle to a region that can be used to specify the bounds of a hit test area. This parameter may be set to NULL.

[in] ptTest

Type: POINT

POINT structure that contains the coordinates of the point.

[out] pwHitTestCode

Type: WORD*

WORD that receives the hit test code that indicates whether the point in ptTest is in the background area bounded by pRect or hrgn. See Hit Test Return Values for a list of values returned.

Return value

Type: HRESULT

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

Remarks

The values in ptTest and pRect should be in the same coordinate system, such as client or screen. If the hrgn parameter is used, it must be specified in the same coordinates as pRect and ptTest.

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

See also

Property Identifiers