Compartilhar via


ShowCaret (Windows CE 5.0)

Send Feedback

This function makes the caret visible on the screen at the caret's current position. When the caret becomes visible, it begins flashing automatically.

BOOLShowCaret(HWNDhWnd);

Parameters

  • hWnd
    [in] Handle to the window that owns the caret. If this parameter is NULL, ShowCaret 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

ShowCaret shows the caret if the specified window owns the caret and the caret has a shape. If either of these conditions is not met, ShowCaret displays nothing and returns zero. If the caret has been hidden two or more times in a row, ShowCaret displays nothing, but returns a nonzero value.

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

The system provides one caret per queue. A window should create a caret only when it has the keyboard focus or is active. The window should destroy the caret before losing the keyboard focus or becoming inactive.

Requirements

OS Versions: Windows CE 1.0 and later.
Header: Winuser.h.
Link Library: Caret.lib.

See Also

CreateCaret | DestroyCaret | GetCaretPos | HideCaret | SetCaretPos | Carets Functions

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.