# Function Reference

# _WinAPI_GetCursorInfo

Retrieves information about the global cursor

#include <WinAPIRes.au3>
_WinAPI_GetCursorInfo ( )

## Return Value

Success: | Array with the following format: $aCursor[0] - True $aCursor[1] - True if cursor is showing, otherwise False $aCursor[2] - Handle to the cursor $aCursor[3] - X coordinate of the cursor $aCursor[4] - Y coordinate of the cursor
Failure: | Sets the @error flag to non-zero, call _WinAPI_GetLastError() to get extended error information

## See Also

Search GetCursorInfo in MSDN Library.

## Example

    #include <MsgBoxConstants.au3>
    #include <WinAPIRes.au3>

    Example()

    Func Example()
        Local $aCursor, $sText
        $aCursor = _WinAPI_GetCursorInfo()
        $sText = "Was the operation sucessful? " & $aCursor[0] & @CRLF
        $sText &= "Is the cursor showing? " & $aCursor[1] & @CRLF & @CRLF
        $sText &= "Cursor Handle: " & $aCursor[2] & @CRLF
        $sText &= "X Coordinate: " & $aCursor[3] & @CRLF
        $sText &= "Y Coordinate: " & $aCursor[4]
        MsgBox($MB_SYSTEMMODAL, "_WinAPI_GetCursorInfo Example", $sText)
    EndFunc   ;==>Example