Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!sdd.hp.com!usc!julius.cs.uiuc.edu!apple!well!cbm From: cbm@well.sf.ca.us (Chris Muir) Newsgroups: comp.sys.mac.programmer Subject: Re: Detecting Color Depth Message-ID: <21526@well.sf.ca.us> Date: 7 Nov 90 18:18:37 GMT References: <1990Nov6.231358.18153@Neon.Stanford.EDU> Organization: Whole Earth 'Lectronic Link, Sausalito, CA Lines: 43 This is from a working program: #include typedef struct ScreenWorld { int bitDepth; int inColor; int hPix; int vPix; }ScreenWorld; void GetScreenInfo(ScreenWorld *theScreen); void GetScreenInfo(theScreen) ScreenWorld *theScreen; { GDHandle curGD; Rect tempRect; curGD = GetGDevice(); tempRect = (**(**curGD).gdPMap).bounds; theScreen->hPix = tempRect.right - tempRect.left; theScreen->vPix = tempRect.bottom - tempRect.top; theScreen->bitDepth = (**(**curGD).gdPMap).pixelSize; theScreen->inColor = (BitTst( &( (**curGD).gdFlags ), 15)); } -- __________________________________________________________________________ Chris Muir | "There is no language in our cbm@well.sf.ca.us | lungs to tell the world just {hplabs,pacbell,ucbvax,apple}!well!cbm | how we feel" - A. Partridge