home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!pageworks.com!world!eff!news.oc.com!mercury.unt.edu!cs.utexas.edu!zaphod.mps.ohio-state.edu!wupost!decwrl!decwrl!claris!outpost.SF-Bay.org!peirce
- From: peirce@outpost.SF-Bay.org (Michael Peirce)
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: How to tell screen depth?
- Message-ID: <D2150035.ij04hl@outpost.SF-Bay.org>
- Date: 13 Nov 92 23:56:02 GMT
- Reply-To: peirce@outpost.SF-Bay.org (Michael Peirce)
- Organization: Peirce Software
- Lines: 23
- X-Mailer: uAccess - Macintosh Release: 1.6v1
-
-
- In article <BxM74p.JzH@news.iastate.edu> (comp.sys.mac.programmer), niko@iastate.edu (Nikolaus E Schuessler) writes:
- > In article <jvp.721588860@cpre1.ee.iastate.edu> jvp@vlsi2.ee.iastate.edu (Jim Van Peursem) writes:
- > > How do I tell the screen depth of the monitor that one of my window's is
- > >in? I don't want to know if the computer has color quickdraw. I want to
- > >know whether to draw the window in color or not based on the pixel depth
- > >of the screen. Can anyone point me in the right direction please?
- > >
- >
- > You will wan't to use some combination of GetMaxDevice (or GetDevice on
- > something you know to be on the screen you're interested in). I forget exactly
- > what all the parameters are, but it returns a bitmap or window which
- > has a '.pixelDepth' field... if it is greater than 1 then color!
- >
- > Inside Mac V should have the details... Look under 'GetMaxDevice' ...
-
- Also check into DeviceLoop(). It lets your code work when the window
- straddles more than one window. It's fairly straightforward to use.
-
- -- Michael Peirce -- peirce@outpost.SF-Bay.org
- -- Peirce Software -- Suite 301, 719 Hibiscus Place
- -- -- San Jose, California USA 95117
- -- Makers of... -- voice: (408) 244-6554 fax: (408) 244-6882
- -- SMOOTHIE -- AppleLink: peirce & America Online: AFC Peirce
-