How do you set the mouse position in windows?

Started by
4 comments, last by Reverse_Gecko 22 years, 2 months ago
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?
Jeff Bland (Reverse_Gecko)reversegecko@gmail.com
Advertisement
Back in the old DOS days, I would use mickeys retrieval.
You should look it up in the Win32 API.

[Hugo Ferreira][Positronic Dreams][]
"Research is what I''m doing when I don''t know what I''m doing."
- Wernher Von Braun (1912-1977)

Back in the old DOS days, I would use mickeys retrieval.
You should look it up in the Win32 API.

[Hugo Ferreira][Positronic Dreams][]
"Research is what I''m doing when I don''t know what I''m doing."
- Wernher Von Braun (1912-1977)

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.
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
Thanks!
Jeff Bland (Reverse_Gecko)reversegecko@gmail.com

This topic is closed to new replies.

Advertisement