Windows 平板电脑事件 - 禁用保持手势

发布于 2024-08-21 19:13:21 字数 561 浏览 4 评论 0原文

我一直在尝试在平板电脑(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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

柳若烟 2024-08-28 19:13:21

我想出了这个解决方案:

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;
}

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文