Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!agate!saturn!ssyx.ucsc.edu!sirkm From: sirkm@ssyx.ucsc.edu (Greg Anderson) Newsgroups: comp.sys.mac.programmer Subject: Finding the size of the screen under Multifinder/Color QD Message-ID: <10139@saturn.ucsc.edu> Date: 28 Dec 89 22:27:43 GMT Sender: usenet@saturn.ucsc.edu Reply-To: sirkm@ssyx.ucsc.edu (Greg Anderson) Organization: UC Santa Cruz; Division of Social Sciences Lines: 24 TN #117 says to look at the QuickDraw variable screenbits.bounds to find the size of the screen, but on my Mac IIx, this rectangle is always (0,0,0,0) when MultiFinder is installed (color or b&w). The Q&A stack says to "look at all gDevices", taking the union of each screen rectangle to find the total region that makes up the screen, but I'm somewhat unclear on how to do this. First question: what _is_ a gDevice? Is there one & only one gDevice per monitor (/other display device) hooked up to the Mac, or might there be multiple devices referencing a single monitor? If the later, why? The reason I wish to know the size of the screen is simply to center my dialogs on the screen. Given this purpose, should I just look at one gDevice (namely, the one returned by GetGDevice)? Once I have this handle, how should I determine the screen bounds? Get the PixMap from (*gDev)->gdPMap and then look at pixMap.bounds? I'm working from the Beta draft of IM V (unfortunately). ___\ /___ Greg Anderson ___\ /___ \ \ / / Social Sciences Computing \ \ / / \ /\/\ / University of California, Santa Cruz \ /\/\ / \/ \/ sirkm@ssyx.ucsc.edu \/ \/