0

I am currently writing an application that receives touch input through the windows WM_INPUT messages and the HID API. Every touch point received has a handle to the device associated from which it came. This is the same device that the family of WM_POINTER messages would report for the same touch point. My application needs to know which monitor corresponds to a particular touch device. Is there a programmatic way to determine this? If I was using the WM_POINTER API I could use MonitorFromPoint or something similar.

In the control panel under "hardware and sound" there is a category "Tablet PC Settings". If you click this category, a dialog box launches which has a button "Setup". This button launches a calibration tool which allows you to pair a USB HID touch device with a monitor. Does anyone know where these settings might be saved to?

relevant links:

structure received in WM_INPUT messages:

https://msdn.microsoft.com/en-us/library/windows/desktop/ms645562(v=vs.85).aspx

Structure received in WM_POINTER messages:

https://msdn.microsoft.com/en-us/library/windows/desktop/hh454907(v=vs.85).aspx

Thanks.

  • If the system did store the association between HID and monitor there surely wouldn't be the need for the calibration dialog to ask for that information. – IInspectable Feb 02 '17 at 18:52
  • @IInspectable, the calibration tool displays a prompt on each screen and requests the user to tap the corresponding touch screen. – Cairn Overturf Feb 02 '17 at 21:11
  • Exactly. That's the same as asking the user, which physical monitor is to be associated with a particular touch input digitizer device. – IInspectable Feb 02 '17 at 21:19
  • 1
    I should say that I would prefer for the user to only have to setup the system once, through windows. Of course if I can't find a solution to my problem I'll ask the user to calibrate. – Cairn Overturf Feb 02 '17 at 22:26

2 Answers2

0

A generic way to determine where things are stored in the registry, is to watch registry changes. Process Monitor from the Windows Sysinternals Suite by Mark Russinovich, can be used to watch and log changes to the windows registry. So you can start it logging, and then perform your calibration, and then stop and examine the log for the desired registry activity.

Stephen Rauch
  • 47,830
  • 31
  • 106
  • 135
0

Here is a link to a similar question I asked

Associate HID Touch Device with Pnp Monitor.

In short, you can use the details from the HIDApi calls with queries of registry keys to link HID Touch Devices to monitors.

Community
  • 1
  • 1
Clay Brooks
  • 182
  • 1
  • 11