HideCaret

This function removes the caret from the screen. Hiding a caret does not destroy its current shape or invalidate the insertion point.

At a Glance

Header file: Winuser.h
Windows CE versions: 1.0 and later

Syntax

BOOL HideCaret(HWND hWnd);

Parameters

hWnd

[in] Handle to the window that owns the caret. If this parameter is NULL, HideCaret searches the current task for the window that owns the caret.

Return Values

Nonzero indicates success. Zero indicates failure. To get extended error information, call GetLastError.

Remarks

HideCaret hides the caret only if the specified window owns the caret. If the specified window does not own the caret, HideCaret does nothing and returns FALSE.

Hiding is cumulative. If your application calls HideCaret five times in a row, it must also call ShowCaret five times before the caret is displayed.

See Also

CreateCaret, DestroyCaret, GetCaretPos, SetCaretPos, ShowCaret