   get mouse state
  I'm wondering if there's a Windows API or DirectX API that calculates the mouse position. So that it doesn't matter where the cursor on the screen is, it always start at x:0 y:0. When you move the cursor to the right that it then adds +1 to the y position till you stop. So if i would move it 2 inches, that i end up with x:0 y:45 (or something like that). Then when i start moving again, then it should start at x:0 y:0 again etc..What Windows/DirectX API do i need for this??   
  You can do it with DirectInput, but you really don't want to.The simplest solution is to just record the position of the mouse on the last frame, and take the new position as a delta from that using standard Win32 mouse input functions/messages like WM_MOUSEMOVE.   ;Quote:Original post by Evil SteveYou can do it with DirectInput, but you really don't want to.The simplest solution is to just record the position of the mouse on the last frame, and take the new position as a delta from that using standard Win32 mouse input functions/messages like WM_MOUSEMOVE.So you mean writing my own function? I'm doing C# though, not C++, but i will try :) Any code snippets are welcome too.BTW, could you please explain why i don't want to do it with DirectInput?? Cause we use Truevision3D right now, and the input engine of that seems really buggy/slow... So perhaps it uses DirectInput aswell...   ;Quote:Original post by vivendiSo you mean writing my own function? I'm doing C# though, not C++, but i will try :) Any code snippets are welcome too.Yup. What you want to do isn't really that common, so there's not any inbuilt functionality for it (That I know of anyway, I'm not a C# person).Quote:Original post by vivendiBTW, could you please explain why i don't want to do it with DirectInput?? Cause we use Truevision3D right now, and the input engine of that seems really buggy/slow... So perhaps it uses DirectInput aswell...See the link in my last post. DirectInput has no advantages whatsoever, and means that you don't benefit from things like pointer ballistics, which make your cursor feel "wrong" (Just look at UT2004's mouse cursor for an example).   