GetGestureInfo function

本文详细介绍了GetGestureInfo API的功能及使用方法,该API用于通过手势信息句柄检索GESTUREINFO结构。文章提供了参数说明、返回值解释及注意事项,并附带了示例代码。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Retrieves a GESTUREINFO  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 GetLastError will 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 client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

Winuser.h (include Windows.h)

Library

User32.lib

DLL

User32.dll
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值