GetGestureConfig function (winuser.h)

Retrieves the configuration for which Windows Touch gesture messages are sent from a window.

Syntax

BOOL GetGestureConfig(
  [in]      HWND           hwnd,
  [in]      DWORD          dwReserved,
  [in]      DWORD          dwFlags,
  [in]      PUINT          pcIDs,
  [in, out] PGESTURECONFIG pGestureConfig,
  [in]      UINT           cbSize
);

Parameters

[in] hwnd

A handle to the window to get the gesture configuration from.

[in] dwReserved

This value is reserved and must be set to 0.

[in] dwFlags

A gesture command flag value indicating options for retrieving the gesture configuration. See Remarks for additional information and supported values.

[in] pcIDs

The size, in number of gesture configuration structures, that is in the pGestureConfig buffer.

[in, out] pGestureConfig

An array of gesture configuration structures that specify the gesture configuration.

[in] cbSize

The size of the gesture configuration (GESTURECONFIG) structure.

Return value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, use the GetLastError function.

Remarks

Passing a value other than sizeof(GESTURECONFIG) for the cbSize parameter will cause calls to this function to fail and GetLastError will return ERROR_INVALID_PARAMETER (87 in decimal).

The following table lists the gesture configuration values:

Name Value Description
GCF_INCLUDE_ANCESTORS 0x00000001 If specified, GetGestureConfig returns consolidated configuration for the specified window and its parent window chain.
 

Examples

    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();                                       
    }    

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header winuser.h (include Windows.h)
Library User32.lib
DLL User32.dll
API set ext-ms-win-ntuser-misc-l1-2-0 (introduced in Windows 8.1)

See also

Functions

GESTURECONFIG

Programming Guide for Gestures