# Function Reference

# _WinAPI_GetCaretPos

Retrieves the caret's position

#include <WinAPIRes.au3>
_WinAPI_GetCaretPos ( )

## Return Value

Success: | The array that contains the client coordinates of the caret. [0] - x-coordinate of the caret. [1] - y-coordinate of the caret.
Failure: | Sets the @error flag to non-zero.

## See Also

Search GetCaretPos in MSDN Library.

## Example

    #include <Debug.au3>
    #include <WinAPIRes.au3>

    _DebugSetup('Test', True)

    GUICreate("test caret")
    GUICtrlCreateInput("", 10, 10)
    GUISetState()

    Local $aCaret = _WinAPI_GetCaretPos()

    _DebugReportVar('aCaret', $aCaret, True)