title: Can detect touch click on a MFC Windows application?
body: <p>I need to understand if there is a way to detect if a "click" is coming from a <strong>touchscreen</strong> monitor or is a "Mouse click" coming from a normal display, with a Windows application made with C++/MFC. Let me explain a little bit better.</p>
  
  <p>Suppose to have an MFC based app, developed in C++, with big buttons and suppose to have a PC with two monitor connected: on simple display and the other one a touch display.</p>
  
  <p><strong>First scenario: Windows duplicated desktop.</strong>
  If I use the two monitor as duplicated of the main, if I open my app, I can click on button with mouse OR i can "click" it tapping on the touchscreen monitor. There is a way to detect, in the code, if the click is coming from the touchscreen monitor or from the other? On the dialog I have the same event like WM_LBUTTONDOWN ? There is a way, or a workaroudn to detect that the click is coming from the touch monitor (and in that case I want to avoid the click) ?</p>
  
  <p><strong>Second scenario: Windows extended display</strong>
  In this case you can move your main dialog on the normal screen, or on the touchscreen but it's the same of the previous scenario.</p>
  
  <p>Hope the question is clear: I think it's not useful show some code, because it's a generic situation.
  Any idea is appreciated.</p>
  
  <p>Edit: Windows 7 or later but can be fine also Windows 10 (and later)</p>