An application can use the WinShowCursor function to show or hide a cursor. The operating system maintains a show level for the cursor: when the cursor is visible, the its show level is zero; each time the cursor is hidden, its show level is incremented; each time the cursor is shown, its show level is decremented. The show:hide relationship is 1:1, so the show level cannot drop below zero. When first creating a cursor, an application should show the cursor because the application creates the cursor with a show level of 1.

The operating system automatically hides the cursor when the application calls WinBeginPaint; it shows the cursor when the application calls WinEndPaint. Therefore, there is no conflict with the cursor during WM_PAINT processing.


[Back] [Next]