I have found an issue with our Windows 10 application where the X and Y coordinates returned by the Standard Windows message handler for WM_LBUTTONDOWN/WM_LBUTTONUP and WM_POINTERDOWN/WM_POINTERUP differ.
I would expect them to be the same (+/- a few pixels of touch error) but I'm consistently seeing an offset of +50px in the X axis and +65px in the Y axis from WM_POINTERDOWN/WM_POINTERUP. My touch screen has a resolution of 1920px by 1080px. I've added debug to report the returned X and Y coordinates.
If I run my application on my colleague's touchscreen laptop with double the resolution (3840px by 2160px) his machine shows and offset between X & Y returned by WM_LBUTTONDOWN and WM_POINTERDOWN of +100px and +130px respectively. So these offsets seem to be linked to resolution (i.e double my values).
Does anyone know why the X & Y coordinates returned by WM_LBUTTONDOWN and WM_POINTERDOWN or WM_LBUTTONUP & WM_POINTERUP would differ? And if so where is this offset coming from?
I've reset the 'Change the size of text, apps and other items' in my Display settings from '125% (recommended)' to '100%', which has had no effect.
Any suggestions would be much appreciated.
question from:
https://stackoverflow.com/questions/65830895/coordinates-of-wm-pointerdown-and-wm-lbuttondown-differ 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…