EvaluateProximityToRect function

Returns the score of a rectangle as the probable touch target, compared to all other rectangles that intersect the touch contact area, and an adjusted touch point within the rectangle.

Syntax


WINUSERAPI BOOL WINAPI EvaluateProximityToRect(
  _In_   const RECT *controlBoundingBox,
  _In_   const TOUCH_HIT_TESTING_INPUT *pHitTestingInput,
  _Out_  TOUCH_HIT_TESTING_PROXIMITY_EVALUATION *pProximityEval
);

Parameters

controlBoundingBox [in]

The RECT structure that defines the bounding box of the UI element.

pHitTestingInput [in]

The TOUCH_HIT_TESTING_INPUT structure that holds the data for the touch contact area.

pProximityEval [out]

The TOUCH_HIT_TESTING_PROXIMITY_EVALUATION structure that holds the score and adjusted touch-point data.

Return value

If this function succeeds, it returns TRUE. Otherwise, it returns FALSE. To retrieve extended error information, call the GetLastError function.

Remarks

For consistency with Windows, frameworks that handle WM_TOUCHHITTESTING should use the following principles for targeting:

  • Inclusion: If the touch point is within the boundaries of a control, the touch point is not changed.
  • Intersection: Include only controls that intersect the contact geometry.
  • Z-order: If more than one control intersects the contact geometry, and the controls overlap, the control that's highest in the z-order receives priority.
  • Ambiguity: If more than one control intersects the contact geometry, and the controls don't overlap, the control that's closest to the original touch point receives priority.

Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

None supported

Header

Winuser.h

Library

User32.lib

DLL

User32.dll

See also

Functions

 

 

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.