Important: The information in this document is obsolete and should not be used for new development.
SetGDeviceYour application can use the
SetGDeviceprocedure to set a
GDevicerecord as the current device.
PROCEDURE SetGDevice (gdh: GDHandle);
- A handle to a
SetGDeviceprocedure sets the specified
GDevicerecord 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 switches
GDevicerecords as appropriate; and when your application needs to draw into an offscreen graphics world, it can use the
SetGWorldprocedure to set the graphics port as well as the
GDevicerecord for the offscreen environment. However, if your application uses the
SetPortprocedure (described in the chapter "Basic QuickDraw" in this book) instead of the
SetGWorldprocedure to set the graphics port to or from an offscreen graphics world, then your application must use
SetGDevicein conjunction with
A handle to the currently active device is kept in the global variable
SetGDeviceprocedure may move or purge memory blocks in the application heap. Your application should not call this procedure at interrupt time.
SEE ALSOSee the chapter "Offscreen Graphics Worlds" in this book for information about the
SetGWorldprocedure and about drawing into offscreen graphics worlds.