home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / mac / programm / 18398 < prev    next >
Encoding:
Internet Message Format  |  1992-11-14  |  1.8 KB

  1. 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
  2. From: peirce@outpost.SF-Bay.org (Michael Peirce)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Re: How to tell screen depth?
  5. Message-ID: <D2150035.ij04hl@outpost.SF-Bay.org>
  6. Date: 13 Nov 92 23:56:02 GMT
  7. Reply-To: peirce@outpost.SF-Bay.org (Michael Peirce)
  8. Organization: Peirce Software
  9. Lines: 23
  10. X-Mailer: uAccess - Macintosh Release: 1.6v1
  11.  
  12.  
  13. In article <BxM74p.JzH@news.iastate.edu> (comp.sys.mac.programmer), niko@iastate.edu (Nikolaus E Schuessler) writes:
  14. > In article <jvp.721588860@cpre1.ee.iastate.edu> jvp@vlsi2.ee.iastate.edu (Jim Van Peursem) writes:
  15. > >  How do I tell the screen depth of the monitor that one of my window's is
  16. > >in?  I don't want to know if the computer has color quickdraw.  I want to
  17. > >know whether to draw the window in color or not based on the pixel depth
  18. > >of the screen.  Can anyone point me in the right direction please?
  19. > >
  20. > You will wan't to use some combination of GetMaxDevice (or GetDevice on
  21. > something you know to be on the screen you're interested in). I forget exactly
  22. > what all the parameters are, but it returns a bitmap or window which
  23. > has a '.pixelDepth' field... if it is greater than 1 then color!
  24. > Inside Mac V should have the details... Look under 'GetMaxDevice' ...
  25.  
  26. Also check into DeviceLoop().  It lets your code work when the window
  27. straddles more than one window.  It's fairly straightforward to use.
  28.  
  29. --  Michael Peirce      --   peirce@outpost.SF-Bay.org
  30. --  Peirce Software     --   Suite 301, 719 Hibiscus Place
  31. --                      --   San Jose, California USA 95117
  32. --  Makers of...        --   voice: (408) 244-6554 fax: (408) 244-6882
  33. --            SMOOTHIE  --   AppleLink: peirce & America Online: AFC Peirce
  34.