(0) exportieren Drucken
Alle erweitern

GESTURECONFIG Structure

Gets and sets the configuration for enabling gesture messages and the type of this configuration.

Syntax

typedef struct _GESTURECONFIG {
  DWORD dwID;
  DWORD dwWant;
  DWORD dwBlock;
} GESTURECONFIG, *PGESTURECONFIG;

Mitglieder

dwID

The identifier for the type of configuration that will have messages enabled or disabled. For more information, see Remarks.

dwWant

The messages to enable.

dwBlock

The messages to disable.

Hinweise

It is impossible to disable two-finger panning and keep single finger panning. You must set the want bits for GC_PAN before you can set them for GC_PAN_WITH_SINGLE_FINGER_HORIZONTALLY or GC_PAN_WITH_SINGLE_FINGER_VERTICALLY.

An inertia vector is included in the GID_PAN message with the GF_END flag if inertia was disabled by a call to SetGestureConfig.

When you pass this structure, the dwID member contains information for a set of gestures. This determines what the other flags will mean. If you set flags for pan messages, they will be different from those flags that are set for rotation messages.

The following table indicates the various identifiers for gestures that are supported by the dwID member of the GESTURECONFIG structure. Note that setting dwID to 0 indicates that global gesture configuration flags are set.

NameValueDescription
GID_ZOOM3Indicates configuration settings for the zoom gesture.
GID_PAN4Indicates the pan gesture.
GID_ROTATE5Indicates the rotation gesture.
GID_TWOFINGERTAP6Indicates the two-finger tap gesture.
GID_PRESSANDTAP7Indicates the press and tap gesture.

 

The following flags are used when dwID is set to 0.

NameValueDescription
GC_ALLGESTURES0x00000001Indicates all of the gestures.

 

The following flags are used when dwID is set to GID_ZOOM.

NameValueDescription
GC_ZOOM0x00000001Indicates the zoom gesture.

 

The following flags are used when dwID is set to GID_PAN.

NameValueDescription
GC_PAN0x00000001Indicates all pan gestures.
GC_PAN_WITH_SINGLE_FINGER_VERTICALLY0x00000002Indicates vertical pans with one finger.
GC_PAN_WITH_SINGLE_FINGER_HORIZONTALLY0x00000004Indicates horizontal pans with one finger.
GC_PAN_WITH_GUTTER0x00000008Limits perpendicular movement to primary direction until a threshold is reached to break out of the gutter.
GC_PAN_WITH_INERTIA0x00000010Indicates panning with inertia to smoothly slow when pan gestures stop.

 

Hinweis   Setting the GID_PAN flags in SetGestureConfig will affect the default gesture handler for panning. You should not have both dwWant and dwBlock set for the same flags; this will result in unexpected behavior. See Windows Touch Gestures for more information on panning and legacy panning support; see SetGestureConfig for examples of enabling and blocking gestures.

The following flags are used when dwID is set to GID_ROTATE.

NameValueDescription
GC_ROTATE0x00000001Indicates the rotation gesture.

 

The following flags are used when dwID is set to GID_TWOFINGERTAP.

NameValueDescription
GC_TWOFINGERTAP0x00000001Indicates the two-finger tap gesture.

 

The following flags are used when dwID is set to GID_PRESSANDTAP.

NameValueDescription
GC_PRESSANDTAP0x00000001Indicates the press and tap gesture.

 

Beispiele


    GESTURECONFIG gc[3];    
    UINT uiGcs = 3;

    ZeroMemory(&gc, sizeof(gc));
    gc[0].dwID  = GID_ZOOM;
    gc[1].dwID  = GID_ROTATE;
    gc[2].dwID  = GID_PAN;
    BOOL bResult = GetGestureConfig(hWnd, 0, 0, &uiGcs, gc, sizeof(GESTURECONFIG));        
    if (!bResult){                
        DWORD err = GetLastError();                                       
    }    


Anforderungen

Mindestens unterstützter Client

Windows 7

Mindestens unterstützter Server

Windows Server 2008 R2

Header

Winuser.h (include Windows.h)

Siehe auch

Structures
GetGestureConfig
SetGestureConfig

 

 

Anzeigen:
© 2014 Microsoft