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

Reverse_Gecko    122
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
DaJoostMan    122
I would say u should better drop the mouse pointer completely. U just want the x,y displacement of the mouse. look that up in the api instead, i think it would be much more usefull.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
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