[comp.sys.mac.programmer] Detecting screen depth on color system

iand@mullian.ee.mu.OZ.AU (Ian Robert DOBSON) (12/21/90)

I am programming a window at present which will use colour if
the machine is equipped with color QuickDraw.  However, to
optimise the display for users with a B/W monitor, I want
to handle redraw specially when the monitor is in 1 or 2
bit mode.

What I need is a mechanism to detect the screen depth of my
window.  I thought of examining the window's pixmap, but
it raises the following questions:

1. What happens to a window's pixmap if, in a multi-monitor
   environment, the window is moved from a >=8 bit monitor
   to a b/w display?

2. How is a window straddling a screen boundary (and thus
   displayed partially on both screens) stored in memory?

3. How do I ensure my window update method is consistant
   in a multi-monitor environment?  I.E. I don't want
   half my window to be updated one way and half the
   other.  I guess I should redraw the window with a
   method appropriate for the display with the lowest
   number of bits/pixel if the window appears on more
   than one monitor.  How do I find this #bits/pixel
   for such a window?


Please send mail and I'll summarize.

Thanks in advance,

Ian R. Dobson
Department of Electrical Engineering
University of Melbourne, Australia
iand@mullian.ee.mu.oz.AU