Declare Function GetClipCursor Lib "user32.dll" (lprc As RECT) As Long
Platforms: Win 32s, Win 95/98, Win NT
GetClipCursor finds the current confinement rectangle of the mouse cursor. The mouse cursor is confined by using ClipCursor. The cursor is confined inside this rectangle -- even SetCursorPos cannot free it. If there is no apparent confinement rectangle, it is actually the size of the screen. The coordinates of the rectangle is put into lprc. The function returns 0 if an error occured, or 1 if it succeeded.
Example:
' Display the coordinates of the confinement rectangle.
Dim r As RECT ' receives coordinates of rectangle
Dim retval As Long ' return value
retval = GetClipCursor(r) ' read the coordinates and put them into r
Debug.Print r.Left; r.Top ' display upper-left (x,y) pair
Debug.Print r.Right; r.Bottom ' display lower-right (x,y) pair
See Also: ClipCursor
Category: Cursor
Go back to the alphabetical Function listing.
Go back to the Reference section index.
This page is copyright © 2000 Paul Kuliniewicz. Copyright Information.
Go back to the Windows API Guide home page.
E-mail: vbapi@vbapi.com Send Encrypted E-Mail
This page is at http://www.vbapi.com/ref/g/getclipcursor.html