Windows 平板电脑事件 - 禁用保持手势
我一直在尝试在平板电脑(Windows 7)上实现长按功能。 问题是我在触摸平板电脑时没有收到 MouseDown 事件(触摸并等待)。
仅当我移动手指(拖动)后,我才会收到 MouseDown 事件。 当我在一段时间后拿起它时,只有这样我才能同时获得向下和向上事件。
我发现这个问题是由于此处提到的“Hold-through”手势而发生的: http://msdn.microsoft.com/en- us/library/ms703320%28VS.85%29.aspx
我想禁用此手势,就像他们按住按住一样: hxxp:...microsoft.com/en-us/library/bb969148%28VS.85%29.aspx
我已经成功实现了按住手势禁用,但我找不到如何禁用保持手势。
也许它是以相同的方式完成的,但具有不同的常数。
我非常感谢您对此的帮助。
谢谢你, B乔
I've been trying to implement a long-press feature on a Tablet PC (Windows 7).
The problem is I don't get the MouseDown event when touching the tablet (touch and wait).
I do get a MouseDown event only after I move my finger (dragging).
And when I pick it up after a while, only then do I get both down and up events at the same time.
I have found out that this problem is happening due to the "Hold-through" gesture, mentioned here:
http://msdn.microsoft.com/en-us/library/ms703320%28VS.85%29.aspx
I want to disable this gesture, the same way they do it with press and hold:
hxxp:...microsoft.com/en-us/library/bb969148%28VS.85%29.aspx
I have implemented the press and hold gesture disable successfully, but nowhere could I find how to disable the Hold Through gesture.
Maybe it is done the same way but with different constant.
I would really appreciate your help on this.
Thank you,
BJoe
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想出了这个解决方案:
private IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool Handling)
{
if (msg == 716) //平板电脑被触摸
{
//平板电脑在第一次触摸时发送此消息而不是按下鼠标
/处理消息/
}
返回 IntPtr.0;
}
I came up with this solution:
private IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)
{
if (msg == 716) //Tablet touched
{
//Tablets on first touch send this instead of mouse down
/Handle message/
}
return IntPtr.Zero;
}