warping cursor

Hi, I’m writing a first person shooter game and need to warp the mouse pointer back to a certain spot every time it is moved. I’ve done this using glut before but this time im going to use windows, does anyone know how to do this?

i use this

tagPOINT lpPoint;



just what i was looking for thanks!

Little hint - use the SetCursorPos only if your application is in the foreground or do it in response to WM_MOUSEMOVE. It’s just nice to have the ability do pause the game and switch to another application.

tanks for the tip, definitly worth keeping in mind