Important: The information in this document is obsolete and should not be used for new development.
 
  
  
  
 
SetGDevice
Your application can use theSetGDeviceprocedure to set aGDevicerecord as the current device.
PROCEDURE SetGDevice (gdh: GDHandle);
gdh- A handle to a
GDevicerecord.DESCRIPTION
TheSetGDeviceprocedure sets the specifiedGDevicerecord 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 switchesGDevicerecords as appropriate; and when your application needs to draw into an offscreen graphics world, it can use theSetGWorldprocedure to set the graphics port as well as theGDevicerecord for the offscreen environment. However, if your application uses theSetPortprocedure (described in the chapter "Basic QuickDraw" in this book) instead of theSetGWorldprocedure to set the graphics port to or from an offscreen graphics world, then your application must useSetGDevicein conjunction withSetPort.A handle to the currently active device is kept in the global variable
TheGDevice.SPECIAL CONSIDERATIONS
TheSetGDeviceprocedure 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 theSetGWorldprocedure and about drawing into offscreen graphics worlds.
 
  
  
 