I've been making a 2D game with D3D and I'd like to implement the mouse to work with it. I've come up with an algorithm that works fine but the only problem is, is that I'm basing it off the size of the client area of the window. After looking long and hard to what is wrong, I found that getting the coordinates from GetClientRect() is slightly off. The X value is fine but the Y is off by ~20 when the window is at 800x800 (I have no menus or anything else special on the window). Is this true or am I going crazy and is there a way around this, because this takes away a lot of accuracy from the cursor.