Change or hold position of mouse


I want to know if it's possible to change and/or hold the position of the mouse by code.

As example, I have an object,movable when dragged with the mouse, rotating around another object. I want the rotating object to move clockwise when the mouse moves right and counter clockwise when left. The rotating part isn't the problem. As you can see an infinite number of mickeys is possible to the left and right. This is a problem since I'm working in windowed mode and need the mouse to remain in the window.
My question is: how can I lock the mouse in place so it won't leave the screen when you hold the left mouse button down?

Help is really appreciated ^_^

Edgar Reynaldo

Wow I feel kinda stupid right now. I really couldn't find it.

Thread #607631. Printed from