Creating and Displaying a Caret (Windows Embedded CE 6.0)

1/6/2010

A window that receives keyboard input typically displays the characters that the user types in the window client area. A window should use a caret to indicate the position in the client area where the next character will appear. The window should create and display the caret when it receives the keyboard focus, and it should hide and destroy the caret when it loses the focus. A window can perform these operations when the WM_SETFOCUS and WM_KILLFOCUS messages are processed, respectively.

Use the CreateCaret, ShowCaret, DestroyCaret, and HideCaret functions to control the visibility of the caret. Use the SetCaretPos function to change the position of the caret as the user types.

See Also

Concepts

Receiving Keyboard Input

Other Resources

GWES Application Development