Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to programmatically tell if a system is touch enabled?

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?

like image 310
user577240 Avatar asked May 10 '11 23:05

user577240


1 Answers

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 is 1. If the system has multi-touch digitizers, the return value is the number of simultaneous contacts the hardware can provide.

like image 120
Pål Brattberg Avatar answered Nov 15 '22 04:11

Pål Brattberg