We recommend using Visual Studio 2017
This documentation is archived and is not being maintained.


Shows the caret on the screen at the caret's current position.

void ShowCaret( );

Once shown, the caret begins flashing automatically.

The ShowCaret member function shows the caret only if it has a current shape and has not been hidden two or more times consecutively. If the caret is not owned by this window, the caret is not shown.

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

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

See the example for CWnd::CreateCaret.

Header: afxwin.h