# Function Reference

# _WinAPI_DestroyCaret

Destroys the caret's current shape, frees the caret from the window, and removes the caret from the screen

#include <WinAPIRes.au3>
_WinAPI_DestroyCaret ( )

## Return Value

Success: | True.
Failure: | False, call _WinAPI_GetLastError() to get extended error information.

## Remarks

_WinAPI_DestroyCaret() destroys the caret only if a window in the current task owns the caret.
If a window that is not in the current task owns the caret, _WinAPI_DestroyCaret() does nothing and returns 0.
The window should destroy the caret before losing the keyboard focus or becoming inactive.

## See Also

Search DestroyCaret in MSDN Library.