Important: The information in this document is obsolete and should not be used for new development.
SetGDevice
Your application can use theSetGDevice
procedure to set aGDevice
record as the current device.
PROCEDURE SetGDevice (gdh: GDHandle);
gdh
- A handle to a
GDevice
record.DESCRIPTION
TheSetGDevice
procedure sets the specifiedGDevice
record as the current device. Your application won't generally need to use this procedure, because when your application draws into a window on one or more screens, Color QuickDraw automatically switchesGDevice
records as appropriate; and when your application needs to draw into an offscreen graphics world, it can use theSetGWorld
procedure to set the graphics port as well as theGDevice
record for the offscreen environment. However, if your application uses theSetPort
procedure (described in the chapter "Basic QuickDraw" in this book) instead of theSetGWorld
procedure to set the graphics port to or from an offscreen graphics world, then your application must useSetGDevice
in conjunction withSetPort
.A handle to the currently active device is kept in the global variable
TheGDevice
.SPECIAL CONSIDERATIONS
TheSetGDevice
procedure may move or purge memory blocks in the application heap. Your application should not call this procedure at interrupt time.SEE ALSO
See the chapter "Offscreen Graphics Worlds" in this book for information about theSetGWorld
procedure and about drawing into offscreen graphics worlds.