hmm.. quite confusing...

Anyway, when you click somewhere, you don't need SetCursorPos because the cursor is already there?

if you want to 'trap' the mouse between a RECT (can be 1 by 1, so looks unmovable), use ClipCursor, and if you ever want to hide it use ShowCursor.

If you need mouseclicking/moving (clipping not yet supported) made easy, download my class from
http://www.geocities.com/despotez/WH/