1.15.4 The Cursor Hotspot and Confining the Cursor

A cursor has a hotspot. When Windows draws the cursor, it always places the hotspot over the point on the display screen that represents the current position of the mouse or keyboard DIRECTION key. For example, the hotspot on the pointer is the point at the tip of the arrow.

The ClipCursor function confines the cursor to a given rectangle on the display screen. The cursor can move to the edge of the rectangle but cannot move out of it. ClipCursor is typically used to restrict the cursor to a given window such as a dialog box that contains a warning about a serious error. The rectangle is always given in screen coordinates and does not have to be within the window of the currently running application.