Windows 7,无法接收两个不同控件上的多点触控事件
我的机器上有 Win 7 操作系统,并且有支持多点触摸的显示器,最多支持 2 个同时触摸。
我创建了带有两个滑块的 MFC 对话框应用程序,并尝试用两根手指同时移动它们,但只能移动一个滑块。如果我用两根手指触摸对话框,那么它会收到两次触摸,但两个不同的滑块不会同时收到触摸。
在 MS Paint 上我可以用两根手指画画。
我还尝试搜索涉及多个控件的多点触控应用程序,但找不到任何一个,我开始怀疑它是否可以在 Windows 7 上使用,
谢谢。
I have Win 7 OS on my machine and have Multi-touch capable monitor which supports up to 2 simultaneous touches.
I have created MFC Dialog application with two sliders and am trying to move them simultaneously with two fingers, but can only move one slider. If I touch the dialog box with two fingers then it receives two touches but two different sliders don't receive simultaneous touches.
On MS Paint I can draw using two fingers.
I also tried to search for multitouch application involving more than one controls but could not find any, and I am starting to wonder if its possible at all on Windows 7
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您不仅需要操作系统支持多点触控,还需要您的控件。您完成了 MFC 和多点触控的动手实验室吗? http://channel9.msdn.com/learn/courses/Windows7/Multitouch有几个 Native 和 MFC 示例。
如果您的应用程序中并不真正需要两个滑块同时移动,而只是尝试一下,请尝试一些不同的操作,例如通过捏合缩放或通过拖动两根手指平移、旋转等。如果您想要多个滑块独立触摸(即不解释为捏缩放)游戏的源代码是最好的例子。
You need not only your OS to support multi-touch, but your controls too. Have you done the Hands on Labs for MFC and Multitouch? http://channel9.msdn.com/learn/courses/Windows7/Multitouch has several Native and MFC examples.
If you don't have a real need in your app for two sliders moving at once, but were just trying it out, try something a little different, like zooming by pinching or panning by dragging two fingers, rotating etc. If you want multiple independent touches (ie not interpreted as a pinch zoom) the source code for games is your best examples.
如果使用 WPF 可行,“Surface Toolkit for Windows Touch”提供了一整套可同时使用的触摸优化控件。
您也许可以在 MFC UI 中托管 WPF 控件,但请注意,所有 WPF 控件都需要位于单个 hwnd 中 - Win7 有一个操作系统限制,即一次只能使用一个 hwnd 来完成多点触控。
if using WPF is feasible, the "Surface Toolkit for Windows Touch" provides a full suite of touch optimized controls that can be used simultaneously.
you could perhaps host the WPF controls inside your MFC UI but be aware that all of the WPF controls would need to be in a single hwnd - Win7 has an OS limitation that multitouch can only be done with one hwnd at a time.