在GameDev中的相关贴子:
(1)http://www.gamedev.net/topic/623813-getting-mouse-position/
里面有几句很重要的话:
<1>How do you create your application window?
A common mistake is to choose some backbuffer resolution (for example 1024x768), create a backbuffer with this resolution and also create a window with this size - while forgetting, that if window is 1024x768 then its client area is smaller (because of the title bar and borders) and DirectX rendering will be stretched.
<2>//一般我们取得坐标后,就可以横坐标加8/2,纵坐标加28/2即可获取真实的坐标,不过不同创建窗口的风格会导致不同的差异,所以请依据真实情况调整即可
it's 8 pixels for borders and 28 pixels for the title bar (on my Vista, this depends on your OS and your settings, you can change the title bar size somewhere).
(2)关于DInput取不了屏幕坐标的思考,及Windows Proc取坐标有问题的解决方案