Partager via


Direct Manipulation Gestures with Single Touch (Compact 7)

3/12/2014

An application must disable pan and scroll gesture messages if it is to receive direct manipulation gesture messages. The direct manipulation gesture messages provide sufficient information for an application to respond to a user’s pan and scroll gestures.

The recognizer will send repetitive direct manipulation messages when it detects single-finger movement, such as a pan gesture. In these messages, HIDWORD(ullArguments) is 0 (zero) and the GF_INERTIA flag is clear, indicating a single touch point and no inertia, just as with single-touch pan (GID_PAN) messages. The contact point is ptsLocation.

The recognizer sends a direct manipulation message when a single finger is lifted immediately after a movement that exceeds the flick threshold, such as a flick gesture. In this message the GF_INERTIA flag is set, just as with single-touch scroll (GID_SCROLL) messages. The ullArguments member contains angle, direction, and velocity information about the flick. The following example code shows how to extract this information.

LONG lScrollAngle = GID_SCROLL_ANGLE(gi.ullArguments);
ULONG ulScrollDirection = GID_SCROLL_DIRECTION(gi.ullArguments);
LONG lScrollVelocity = GID_SCROLL_VELOCITY(gi.ullArguments);

See Also

Concepts

Direct Manipulation Gestures