禁用 WinForm 的手写笔手势
我需要禁用 winform 的所有手写笔手势。我希望手写笔能够正常工作(即基本上作为鼠标的替代品),但手写笔手势主要是障碍。 理想情况下,手势仅针对特定形式禁用,但应用程序范围也是可以接受的。
由于我的应用程序是全屏的,我什至可以满足在系统范围内禁用手写笔手势的要求,但需要在应用程序退出时恢复原始状态。
到目前为止,我所拥有的是: 我在 WndProc 中捕获 WM_TABLET_FLICK 消息并返回 FLICK_WM_HANDLED_MASK,表明不需要进一步操作。
从某种意义上说,这是有效的,影片被忽略了。然而,我也失去了作为轻弹一部分的所有手写笔移动。在我看来,我需要在更深层次上禁用轻弹,这样系统甚至不会费心去尝试识别任何轻弹。
有什么想法吗?
I need to disable all stylus gestures for a winform. I want the stylus to function normally (i.e. basically as a mouse substitute) but the stylus gestures are majorly in the way.
Ideally, the gestures would only be disabled for a specific form, but application wide is also acceptable.
Since my app is full screen I could even settle for disabling stylus gestures system wide but would need to restore the original state when the app exits.
So far, what I have is:
I catch the WM_TABLET_FLICK message in the WndProc and return with FLICK_WM_HANDLED_MASK, indicating the no further action is required.
That works in the sense that the flick is ignored. HOWEVER, I also loose all stylus movement that is part of the flick. It seems to me that I need to disable the flicks on a deeper level, such that the system doesn't even bother trying to recognize any flicks to begin with.
Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
解决方案:
在WndProc中捕获WM_TABLET_QUERYSYSTEMGESTURESTATUS并返回TABLET_DISABLE_FLICKS。
这甚至会禁用轻弹检测,即不会丢失手写笔的移动。
进一步的“信息”:
msdn
Solution:
catch WM_TABLET_QUERYSYSTEMGESTURESTATUS in WndProc and return TABLET_DISABLE_FLICKS.
that disables even the detection of flicks, i.e. no stylus movement gets lost.
further "info":
msdn