Hmm... to check if the mouse is inside your circle you should use... the equation of a cirlce! (otherwise known as pythagoras<- did i spell that right?)
X^2 + Y^2 = r^2
where x and y are the mouse's co-ords, and r is the radius of your circle, if they are greater than the result is greater than r^2, then the mouse is outside of your circle.
And each loop through your logic, if the mouse is inside the circle, store its co-ords in some int's, when its outside the circle, set the mouse position to the last know co-ords of the mouse.
That should be one quick way of keeping your mouse in a circle
Now, you'll also need to offset the x and y co-ords of the mouse when you check them, since the origin of the circle would be the top left of the screen.
As for a curved area, make a bigger circle, and adjust the offsets. If you have no idea what i've been rambling on about, say so.