ShowCaret

2.x

  void ShowCaret(hwnd)    
  HWND hwnd; /* handle of window with caret */

The ShowCaret function shows the caret on the screen at the caret's current position. Once shown, the caret begins flashing automatically.

Parameters

hwnd

Identifies the window that owns the caret. This parameter can be set to NULL to indirectly specify the window in the current task that owns the caret.

Return Value

This function does not return a value.

Comments

The ShowCaret function shows the caret only if it has a current shape and has not been hidden two or more times consecutively. If the given window does not own the caret, the caret is not shown. If the hwnd parameter is NULL, the ShowCaret function shows the caret only if it is owned by a window in the current task.

Hiding the caret is cumulative. If the HideCaret function has been called five times consecutively, ShowCaret must be called five times to show the caret.

The caret is a shared resource. A window should show the caret only when it has the input focus or is active.

See Also

CreateCaret, GetActiveWindow, GetFocus, HideCaret