Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining

HitTestThemeBackground (Windows CE 5.0)

Windows CE 5.0
Send Feedback

This function retrieves the hit test code for a point within the specified themed background.

HRESULT GetThemeColor(
  HTHEME hTheme,
  HDC hdc,
  int iPartId,
  int iStateId,
  DWORD dwOptions,
  const RECT* pRect,
  HRGN hrgn,
  POINT ptTest,
  WORD* pwHitTestCode


[in] Handle to a window's specified theme data. To create a theme data handle, use OpenThemeDataEx.
[in] Handle to a device context (HDC) used for drawing the background image. This parameter is optional parameter and may be set to NULL.
[in] Integer value that specifies the part. For more information, see Theme Parts and States.
[in] Integer value that specifies the state of the part. For more information, see Theme Parts and States.
[in] Specifies the hit test options. For more information, see Theme Hit Test Values.
[in] Pointer to the RECT structure that contains the logical coordinates for the rectangle that bounds the background.
[in] Handle to a region that can be used to specify the bounds of a hit test area. This parameter is optional and may be set to NULL.
[in] POINT structure that contains the coordinates of the point.
[out] WORD that receives the hit test code that indicates whether or not the coordinates specified in ptTest is in the background area bounded by pRect or hrgn. For the possible hit test return values, see Theme Hit Test Values.

Return Values

Returns S_OK if successful, or E_FAIL otherwise.


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.


OS Versions: Windows CE 5.0 and later.
Header: Uxtheme.h.
Link Library: Ietheme.dll.

See Also

Theme Support Reference

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.

© 2015 Microsoft