I realize this is a really old thread but it's one of the first results in google so maybe this'll help someone.
If you have AutoHotkey you can use this script:
Confine := 1
ClipCursor( Confine, 0, 0, A_ScreenWidth, A_ScreenHeight )
^F2:: ; Hotkey will toggle status ctrl+f2
Confine := !Confine
ClipCursor( Confine, 0, 0, A_ScreenWidth, A_ScreenHeight )
Return
ClipCursor( Confine=True, x1=0 , y1=0, x2=1, y2=1 ) {
VarSetCapacity(R,16,0), NumPut(x1,&R+0),NumPut(y1,&R+4),NumPut(x2,&R+8),NumPut(y2,&R+12)
Return Confine ? DllCall( "ClipCursor", UInt,&R ) : DllCall( "ClipCursor" )
}
Just save it as like cursorlock.ahk and run it with AutoHotkey. Then while you're in the game (though really it'd work whenever) just press CTRL+F2 and it'll lock it to that monitor until you press it again.