home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / mac / programm / 18350 < prev    next >
Encoding:
Text File  |  1992-11-12  |  1.9 KB  |  42 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!pageworks.com!world!eff!sol.ctr.columbia.edu!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!agate!apple!mumbo.apple.com!gallant.apple.com!NewsWatcher!user
  3. From: nerm@apple.com (Dean Yu)
  4. Subject: Re: How to tell screen depth?
  5. Sender: news@gallant.apple.com
  6. Message-ID: <nerm-121192141721@90.10.20.86>
  7. Date: Thu, 12 Nov 1992 22:17:27 GMT
  8. References: <jvp.721588860@cpre1.ee.iastate.edu> <BxM74p.JzH@news.iastate.edu>
  9. Organization: Apple Computer, Inc.
  10. Followup-To: comp.sys.mac.programmer
  11. Lines: 29
  12.  
  13. In article <BxM74p.JzH@news.iastate.edu>, niko@iastate.edu (Nikolaus E
  14. Schuessler) wrote:
  15. > In article <jvp.721588860@cpre1.ee.iastate.edu> jvp@vlsi2.ee.iastate.edu (Jim Van Peursem) writes:
  16. > >  How do I tell the screen depth of the monitor that one of my window's is
  17. > >in?  I don't want to know if the computer has color quickdraw.  I want to
  18. > >know whether to draw the window in color or not based on the pixel depth
  19. > >of the screen.  Can anyone point me in the right direction please?
  20. > >
  21. > You will wan't to use some combination of GetMaxDevice (or GetDevice on
  22. > something you know to be on the screen you're interested in). I forget exactly
  23. > what all the parameters are, but it returns a bitmap or window which
  24. > has a '.pixelDepth' field... if it is greater than 1 then color!
  25. > Inside Mac V should have the details... Look under 'GetMaxDevice' ...
  26. > -- 
  27. > Niko Schuessler               
  28. > Project Vincent Systems Manager              email: niko@iastate.edu
  29. > Iowa State University Computation Center     voice: (515) 294-1672
  30. > Ames IA 50010                                snail: 272 Durham 
  31.  
  32.   Under System 7, the best method is to use DeviceLoop.  DeviceLoop will
  33. call your drawing procedure with the depth of the device you'll be drawing
  34. to.  Check out Inside Mac VI, Graphics Devices, for details.
  35.  
  36. -- Dean Yu
  37.    Blue Meanie, Negative Ethnic Role Model, etc.
  38.    Apple Computer, Inc.
  39.