Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
MSDN Library
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.


Windows Mobile 6.5

The GESTUREINFO structure is filled out by TKGetGestureInfo and provides full details of the gesture.

typedef struct tagGESTUREINFO {
    UINT cbSize;
    DWORD dwFlags;
    DWORD dwID;
        HWND hwndTarget;
    POINTS ptsLocation;
    DWORD dwInstanceID;
    DWORD dwSequenceID;
    ULONGLONG ullArguments;
    UINT cbExtraArguments;


Size of the structure. This must be initialized to sizeof(GESTUREINFO) before you call TKGetGestureInfo.


Contains the gesture flags. Possible values include:





The gesture command. For a list of defined gestures, see the Remarks section, below.


The handle of the target window that should receive the gestures.


POINTS structure that contains the screen coordinates associated with the gesture.


Not used.


The time stamp of the gesture.

Applications can use this value to account for the latency between gestures (in particular, between a flick and a pan).


Information associated with the command. The argument values packed into this field depend on the gesture command.


Size of the extra arguments returned by GetGestureExtraArguments.

The following gesture commands are recognized by the Gesture Engine.


Contains the coordinates that mark the starting point of each touch gesture. This is sent when gesture recognition has begun. This may or may not be some time after the screen is touched.


Contains the coordinates that mark the end point of each touch gesture. This is sent gesture recognition is complete.

The ullArguments field is always set to zero for this command.


Panning occurs when the user presses on the window and moves in any direction while their finger maintains contact with the screen. The Recognition engine sends a GID_PAN message that contains the starting point and the current point of the gesture. GID_PAN messages are sent regularly until the finger or stylus is lifted from the window. GID_END is issued to mark the end of the pan movement.

An application can calculate the movement delta from the difference between two consecutive pan gestures.

If the GF_INERTIA flag is set, the value of ullArguments is the same as for GID_SCROLL.


Scrolling occurs when the user presses on the window (and perhaps pans over the screen) and then motions rapidly in any direction, before lifting the finger or stylus at the end of the movement.

The Recognition engine sends the GID_SCROLL message after a flick gesture.

The ullArguments field contains information about the angle, direction and velocity of the flick.

The core directions are represented by the following values:






When the device rotates, the gestures adjust to match the rotation.

The angle of the flick is measured in values that range from 0 to 65535.

The following macros extract the angle, direction, and velocity from the raw angle.

#define GID_SCROLL_ANGLE (x)

You can convert between the raw angle and radians by using the following macros.


To convert the raw angle to degrees, divide the raw angle by 32768, then multiply that value by 360/32768. 32768 units represent one full circle.

The raw angle is given relative to the current system orientation (agnostic of whether the device is in landscape or portrait mode). When the system rotates, the gesture directions and angles adjust to match the rotation.

The GID_SCROLL is sent to the window that received the first gesture message for the current touch session, which was likely a pan message or a hold message.


Holding occurs when the user presses on the window and keeps the finger or stylus down for more than the hold timeout period.

The Recognition Engine sends a GID_HOLD gesture message, and follows it with a GID_END message when the finger or stylus is lifted.

The HOLD gesture can be followed by a panning movement that generates several GID_PAN messages, but the GID_HOLD message is never issued after a GID_PAN message.

The ullArguments field is not used for this command.


Selection occurs when the user taps on the screen with a finger or stylus in a period of time less than the select timeout period.

The ullArguments field is not used for this command.


Selection occurs when the user taps twice on the screen with a finger or stylus in a period of time less than the specified DOUBLESELECT timeout. This timeout is the time between consecutive mouse up events.

The ullArguments field is not used for this command.

Windows MobileWindows Mobile 6.5 and later

Community Additions

© 2015 Microsoft