ShowCursor

Syntax

int ShowCursor(bShow)

This function shows or hides the cursor. The ShowCursor function actually sets an internal display counter that determines whether the cursor should be displayed. If the bShow parameter is nonzero, ShowCursor adds one to the display count. If bShow is zero, the display count is decreased by one. The cursor is displayed only if the display count is greater than or equal to zero. Initially, the display count is zero if a mouse is installed. Otherwise, it is –1.

Parameter Type/Description  

bShow BOOL Specifies whether the display count is to be increased or decreased. The display count is increased if bShow is nonzero. Otherwise, it is decreased.  

Return Value

The return value specifies the new display count.

Comments

The cursor is a shared resource. A window that hides the cursor should show the cursor before the cursor leaves its client area, or before the window relinquishes control to another window.