Click to Rate and Give Feedback
MSDN
MSDN Library
User Interface
Windows Touch
Functions
 GetGestureInfo Function
GetGestureInfo Function

Retrieves a gesture information structure given a handle to the gesture information.

Syntax

BOOL WINAPI GetGestureInfo(
  __in   HGESTUREINFO hGestureInfo,
  __out  PGESTUREINFO pGestureInfo
);

Parameters

hGestureInfo [in]

The gesture information handle.

pGestureInfo [out]

A pointer to the gesture information 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

The cbSize member of the GESTUREINFO structure passed in to the function must be set before the function is called. Otherwise, calls to GetLastErrorwill return ERROR_INVALID_PARAMETER (87 in decimal). If an application processes a WM_GESTURE message, it is responsible for closing the handle using CloseGestureInfoHandle. Failure to do so may result in process memory leaks.

If the message is passed to DefWindowProc, or is forwarded using one of the PostMessage or SendMessage classes of API functions, the handle is transferred with the message and need not be closed by the application.

Examples


    GESTUREINFO gestureInfo = {0};
    gestureInfo.cbSize = sizeof(gestureInfo);
    BOOL bResult = GetGestureInfo((HGESTUREINFO)lParam, &gestureInfo);

    if (!bResult){                
        DWORD err = GetLastError();                                       
    }
    

Requirements

Minimum supported clientWindows 7
Minimum supported serverWindows Server 2008 R2
HeaderWinuser.h (include Windows.h)
LibraryUser32.lib
DLLUser32.dll

See Also

Functions
Programming Guide for Gestures

Send comments about this topic to Microsoft

Build date: 10/8/2009

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2010 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker