Partager via


HitTestThemeBackground (Windows Embedded CE 6.0)

1/6/2010

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

Syntax

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

Parameters

  • hTheme
    [in] Handle to a window's specified theme data. To create a theme data handle, use OpenThemeDataEx.
  • hdc
    [in] Handle to a device context (HDC) used for drawing the background image. This parameter is optional parameter and may be set to NULL.
  • iStateId
    [in] Integer value that specifies the state of the part. For more information, see Theme Parts and States.
  • pRect
    [in] Pointer to the RECT structure that contains the logical coordinates for the rectangle that bounds the background.
  • hrgn
    [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.
  • ptTest
    [in] POINT structure that contains the coordinates of the point.
  • pwHitTestCode
    [out] WORD that receives the hit test code that indicates whether 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 Value

Returns S_OK if successful, or E_FAIL otherwise.

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

Header uxtheme.h
Library Ietheme.dll
Windows Embedded CE Windows CE 5.0 and later

See Also

Concepts

Theme Support Reference

Other Resources

Theme Support Functions