在窗口中按住手势 [英] press and hold gesture in windows

查看:134
本文介绍了在窗口中按住手势的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



  Windows Touch Gesture Overview提及按和保持手势,但没有像GID_PRESSANDHOLD标识符那样的东西。我不能使用WM_TOUCH消息,因为它将禁用WM_GESTURE消息,这对我来说是必需的。有没有人在Windows上实现Press和
保持手势,是否可以在没有WM_TOUCH消息的情况下实现它?

解决方案

< blockquote>

Hi PrashantKumarNirmal,


感谢您在此发帖。


至于我知道Windows Touch手势可以解释为应用程序开发人员通过处理

来自应用程序的WndProc功能的 WM_GESTURE
消息。 处理此消息后,您可以检索

GESTUREINFO
结构,用于描述手势。 
GESTUREINFO 结构将包含取决于手势类型的各种信息。   



GESTUREINFO
结构。 com / en-us / library / windows / desktop / dd353235(v = vs.85).aspx">
GetGestureInfo 功能。


我认为如果你想实现按住手势,你可以使用WM_GESTURE消息。


以下步骤通常在使用时执行Windows Touch手势:    




  1. 设置接收手势的窗口。
  2. 处理手势消息。
  3. 解释手势消息。

有关更多信息和步骤,请参阅文档。


https://msdn.microsoft .com / zh-CN / library / windows / desktop / dd371578(v = vs.85).aspx


注意  如果您致电 RegisterTouchWindow ,您将停止接收

WM_GESTURE
邮件。 如果您没有收到
WM_GESTURE
消息,请确保您没有调用
RegisterTouchWindow


最诚挚的问候,


Hart




 Windows Touch Gesture Overview mentions Press and Hold Gesture but there is nothing such as GID_PRESSANDHOLD identifier. I cannot use WM_TOUCH message as it will disable WM_GESTURE message which is a necessity for me. Has anyone implemented Press and hold gesture on windows, Is it possible to implement it without WM_TOUCH message?

解决方案

Hi PrashantKumarNirmal,

Thank you for posting here.

As far as I know that Windows Touch gestures can be interpreted by application developers by handling the WM_GESTURE message from the WndProc function of an application.  After handling this message, you can retrieve a GESTUREINFO structure which describes the gesture.  The GESTUREINFO structure will have assorted information that depends on the type of gesture.   

The GESTUREINFO structure is retrieved by passing the handle to the gesture information structure to the GetGestureInfo function.

I think that if you want to implement press and hold gesture, you can use the WM_GESTURE message.

The following steps are typically performed when using Windows Touch gestures:    

  1. Set up a window for receiving gestures.
  2. Handle the gesture messages.
  3. Interpret the gesture messages.

For more information and steps, please see the document.

https://msdn.microsoft.com/en-us/library/windows/desktop/dd371578(v=vs.85).aspx

Note  If you call  RegisterTouchWindow, you will stop receiving WM_GESTURE messages.  If you are not receiving WM_GESTURE messages, make sure that  you haven't called RegisterTouchWindow.

Best Regards,

Hart


这篇关于在窗口中按住手势的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆