有没有一种方法以编程方式告诉我们,如果启用了系统触摸? [英] Is there a way to programmatically tell if a system is touch enabled?
问题描述
我试图找出如何以编程方式告诉我们,如果在Windows 7机具有触摸功能。是否有任何联系的API(托管或非托管),可以帮助我做到这一点?或者,或许是在注册表中,我可以检查?
I'm trying to figure out how to programmatically tell if a Windows 7 machine has touch enabled. Are there any touch API's (managed or unmanaged) that can help me achieve this? Or perhaps something in the registry I can check?
推荐答案
使用<一个href="http://msdn.microsoft.com/en-us/library/ms724385%28v=vs.85%29.aspx"><$c$c>GetSystemMetrics$c$c>寻找 SM_MAXIMUMTOUCHES
设置。
非零如果有在数字化仪
系统;否则, 0
。
Nonzero if there are digitizers in the system; otherwise,
0
.
SM_MAXIMUMTOUCHES
返回
总计最大的最大的
支持每一个触点数量
数字化仪系统中。如果系统
只有单点触摸数字转换器,该
返回值是 1
。如果系统有
多触摸数字化仪,返回
值是同时数
联系人硬件可以提供。
SM_MAXIMUMTOUCHES
returns the
aggregate maximum of the maximum
number of contacts supported by every
digitizer in the system. If the system
has only single-touch digitizers, the
return value is 1
. If the system has
multi-touch digitizers, the return
value is the number of simultaneous
contacts the hardware can provide.
这篇关于有没有一种方法以编程方式告诉我们,如果启用了系统触摸?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!