C language function:EnableMouseInPointer sample codesSearch sample code in the internet.It is the result.
TITLE : Windows-classic-samples/SampleDesktopWindow.cpp at master ‘µ Microsoft/Windows-classic-samples ‘µ GitHub
TITLE : EnableMouseInPointer function (Windows)
TITLE : Comparing Touch Coding Techniques - Windows* 8 Desktop Touch Sample | Intel‘¬ Software
TITLE : c++ - WM_POINTER and High DPI settings - Stack Overflow
Using the mouse on the other hand, worked fine: I got the correct coordinates. Since I have the EnableMouseInPointer(TRUE) mode active it means that the same code is being used to process the mouse events and the touch events, which at least means that my code is somewhat working correctly........