Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Imaging With QuickDraw /
Chapter 8 - Cursor Utilities / Cursor Utilities Reference
Routines / Changing Black-and-White Cursors


GetCursor

You use the GetCursor function to load a cursor resource (described on page 8-31) into memory. You can then display the cursor specified in this resource by calling the SetCursor procedure (described in the next section).

FUNCTION GetCursor (cursorID: Integer): CursHandle;
cursorID
The resource ID for the cursor you want to display. You can supply one of these constants to get a handle to one of the standard cursors:
            CONST
               iBeamCursor = 1;  {to select text}
               crossCursor = 2;  {to draw graphics}
               plusCursor  = 3;  {to select cells}
               watchCursor = 4;  {to indicate a short operation }
                                 { in progress}
DESCRIPTION
The GetCursor function returns a handle to a Cursor record (described on page 8-14) for the cursor with the resource ID that you specify in the cursorID parameter. If the resource can't be read into memory, GetCursor returns NIL.

To get a handle to a color cursor, use the GetCCursor function, which is described on page 8-24.

SEE ALSO
Listing 8-2 on page 8-9 illustrates how to use the GetCursor and SetCursor routines to change the cursor's shape.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996