You initialize the cursor to the standard arrow cursor when you use the InitCursor procedure, as shown in Listing 8-1 . The I-beam, crosshairs, plus sign, and wristwatch cursors are defined as resources, and your application can get a handle to any of these cursors by specifying their corresponding resource IDs to the GetCursor function. Your application usually needs to change the shape of the cursor as the user moves the cursor to different areas within a document. Your application can use mouse-moved events to help accomplish this. Your application also needs to adjust the cursor in response to resume events.
Most applications adjust the cursor once through the event loop in response to almost all events.
You can request that the Event Manager report mouse-moved events whenever the cursor is outside of a specified region that you pass as a parameter to the WaitNextEvent function. If you specify a nonempty region in the mouseRgn parameter to the WaitNextEvent function, WaitNextEvent returns a mouse-moved event whenever the cursor is outside of that region. For example, Figure 8-4 shows a document window. The cursor remains an arrow until the user moves the cursor out of the arrow region, at which point your application receives a mouse-moved event. The MyAdjustCursor procedure sets the cursor appropriately, according to whether a document window or modeless dialog box is active.