GetGestureConfig function

本文介绍了一个Windows API函数GetGestureConfig的使用方法,该函数用于从指定窗口检索触控手势配置。文章提供了函数的参数说明、返回值及注意事项,并附带了示例代码。

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

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

Syntax

BOOL WINAPI GetGestureConfig(
  _In_     HWND hwnd,
  _In_     DWORD dwReserved,
  _In_     DWORD dwFlags,
  _In_     PUINT pcIDs,
  _Inout_  PGESTURECONFIG pGestureConfig,
  _In_     UINT cbSize
);

Parameters

hwnd [in]

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

dwReserved [in]

This value is reserved and must be set to 0.

dwFlags [in]

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

pcIDs [in]

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

pGestureConfig [in, out]

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

cbSize [in]

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: 

NameValueDescription
GCF_INCLUDE_ANCESTORS0x00000001If 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

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、付费专栏及课程。

余额充值