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:
Share and Enjoy
Bookmark this story so others can enjoy it:
Tags
os, Mac, macintosh, apple, programming, software