lotus



previous page: 5.6) GWorlds? (Imaging with QuickDraw - Mac Programming)
  
page up: Mac Programming FAQ
  
next page: 5.8) Why is it a bad idea to draw directly to screen? (Imaging with QuickDraw - Mac Programming)

5.7) How do I find the current depth of the screen? (Imaging with QuickDraw - Mac Programming)




Description

This article is from the Mac Programming FAQ, by Jon Watte h+@austin.metrowerks.com with numerous contributions by others.

5.7) How do I find the current depth of the screen? (Imaging with QuickDraw - Mac Programming)

My question to you is: What screen? Many macs have more than one
screen attached. You can use GetDeviceList and walk the devices to find
the screen you're looking for (use TestDeviceAttribute to see whether
it's a screen) or you can call GetMaxDevice() to find the deepest device
your window intersects.

Once you have the device handle, finding the depth is just a
matter of looking at the gdPMap pixMapHandle, and dereference it
to the pmSize field. Done.

 

Continue to:















TOP
previous page: 5.6) GWorlds? (Imaging with QuickDraw - Mac Programming)
  
page up: Mac Programming FAQ
  
next page: 5.8) Why is it a bad idea to draw directly to screen? (Imaging with QuickDraw - Mac Programming)