Search code examples
touch

Windows, c++ detect finger touch on screen?


In virtual key codes in c++ vk_shift means the shift key for example. But is there any such code to indicate that a finger is touching the touchscreen ? Or how is it handled ?


Solution

  • There are two approaches. Either use Touch Input which will give you a very raw result in TOUCHINPUT, x-y point of the touch events, mostly useful for debugging purpose or if your app needs a unique interface, or Touch Gesture, which will be immediately familiar for users accustomed to other touch interfaces since you'll be handling GESTUREINFO, where you'll get tap, zoom, pan and rotation instead.