Archived

This topic is now archived and is closed to further replies.

Reverse_Gecko

How do you set the mouse position in windows?

Recommended Posts

Im trying to make an fps style engine and use use the mouse to aim. But when the mouse reaches the end of the screen you can''t move the mouse further, and hence you can turn any more in that direction. So if i set the mouse position to 0 every frame then i hope it will work. But how do i set the mouse pos to 0 in the win32 api?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Sounds like your looking for the API function called SetCursorPos. You''ll find documention for it on MSDN. However I think DaJoostMan is correct. You seem more interested in the motion of the mouse, not the cursor position. If that''s the case look into DirectInput.

http://msdn.microsoft.com/library/en-us/winui/cursors_5e43.asp?frame=true

Share this post


Link to post
Share on other sites