1.15.2 Displaying and Hiding the Cursor

In a system without a mouse, Windows does not display or move the cursor unless the user chooses certain system commands, such as commands for sizing and moving. This means that after a call to SetCursor, the cursor remains on the screen until a subsequent call to SetCursor with a NULL parameter removes the cursor, or until a system command is carried out. Applications that wish to use the cursor without a mouse usually simulate mouse input by using keyboard keys, such as the DIRECTION keys, and display and move the cursor by using the cursor functions.

The ShowCursor function shows or hides the cursor. It is used to temporarily hide the cursor, and then restore it without changing the current cursor shape. This function actually sets an internal counter that determines whether the cursor should be drawn. Hiding and showing are accumulative, so hiding the cursor five times requires that it be shown five times before the cursor will be drawn.