Thanks for the replies, I figured out how to get clip cursor working.
I'd like to point out that GetWindowRect() returns the entire window's box (including the window title bar with the X close button).
Also you must reactivate the cursor clip when the window is moved/minimized.
I will make a wiki page on how to do this and post the link here.