none
Raw Input and Touch Screens RRS feed

  • Question

  • I want to listen to global touch events and I am looking into using raw input for this. I was able to get my touch screen device registered and receive WM_INPUT messages for touch input. I am wondering how to parse the data returned. I have found documentation saying that the reports use usages for returning the data that I need (mostly just x and y coordinates). It appears that you then use HID functions such as HidP_GetScaledUsageValue() to extract the value of each usage from the report. Our problem is that this function requires PreparsedData from the top-level collection of the device (in our case this would be the top-level collection for touch screens). Obtaining the preparsed data requires an open HANDLE to the top-level collection. How do we open this HANDLE? Is there a simpler way to use Raw Input with touch screens?

    Thanks,

    Matt

    Tuesday, June 3, 2014 6:12 PM

Answers

  • After doing a little more research I found that GetRawInputDeviceInfo() can return PreparsedData which can then be used for all the other functions. I now have global touch input working.
    • Marked as answer by Matt Wesemann Thursday, June 5, 2014 4:08 PM
    Thursday, June 5, 2014 4:08 PM

All replies

  • After doing a little more research I found that GetRawInputDeviceInfo() can return PreparsedData which can then be used for all the other functions. I now have global touch input working.
    • Marked as answer by Matt Wesemann Thursday, June 5, 2014 4:08 PM
    Thursday, June 5, 2014 4:08 PM
  • Hello, thanks for your hint! How can I get touch point coordinates from preparsed data?
    Tuesday, February 26, 2019 7:08 PM