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开发者_StackOverflow社区 in the registry I can check?
Use GetSystemMetrics
to look for SM_MAXIMUMTOUCHES
settings.
Nonzero if there are digitizers in the system; otherwise,
0
.
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 is1
. If the system has multi-touch digitizers, the return value is the number of simultaneous contacts the hardware can provide.
精彩评论