Relative Content

Tag Archive for c++cwinapi

Why am I not getting correct cursor coordinates with Windows API functions?

I am trying to capture the coordinates of the cursor in a Windows application. While the coordinate for the position (0, 0) is displayed correctly in the upper left corner, the coordinates become more and more distorted the further I move away from it, so that instead of (600, 600) only (583, 560) is displayed in the lower right corner. Here is the code I’m using