A window that receives keyboard input typically displays the characters entered by the user in the window's 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 hide and destroy the caret when it loses the focus. A window can perform these operations during the WM_SETFOCUS and WM_KILLFOCUS messages. For more information on carets, see Chapter 53, “Carets.”