EvaluateProximityToRect function (winuser.h)
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.
BOOL EvaluateProximityToRect(
[in] const RECT *controlBoundingBox,
[in] const TOUCH_HIT_TESTING_INPUT *pHitTestingInput,
[out] TOUCH_HIT_TESTING_PROXIMITY_EVALUATION *pProximityEval
);
[in] controlBoundingBox
The RECT structure that defines the bounding box of the UI element.
[in] pHitTestingInput
The TOUCH_HIT_TESTING_INPUT structure that holds the data for the touch contact area.
[out] pProximityEval
The TOUCH_HIT_TESTING_PROXIMITY_EVALUATION structure that holds the score and adjusted touch-point data.
If this function succeeds, it returns TRUE.
Otherwise, it returns FALSE. To retrieve extended error information, call the GetLastError function.
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.
Requirement | Value |
---|---|
Minimum supported client | Windows 8 [desktop apps only] |
Minimum supported server | None supported |
Target Platform | Windows |
Header | winuser.h |
Library | User32.lib |
DLL | User32.dll |