SetCursorPos

2.x

  void SetCursorPos(x, y)    
  int x; /* horizontal position, */  
  int y; /* vertical position, */  

The SetCursorPos function sets the position, in screen coordinates, of the cursor. If the new coordinates are not within the screen rectangle set by the most recent ClipCursor function, Windows automatically adjusts the coordinates so that the cursor stays within the rectangle.

Parameters

x

Specifies the new x-coordinate, in screen coordinates, of the cursor.

y

Specifies the new y-coordinate, in screen coordinates, of the cursor.

Return Value

This function does not return a value.

Comments

The cursor is a shared resource. A window should move the cursor only when the cursor is in its client area.

See Also

ClipCursor, GetCursorPos