Path: utzoo!attcan!uunet!ndsuvax!nopuklic From: nopuklic@ndsuvax.UUCP (Blayne Puklich) Newsgroups: comp.sys.mac.programmer Subject: Re: ResEdit question Keywords: DLOG Message-ID: <1180@ndsuvax.UUCP> Date: 1 Sep 88 06:38:58 GMT References: <730057@hpcilzb.HP.COM> <767@helios.ee.lbl.gov> <13685@agate.BERKELEY.EDU> <554@utacs.UTA.FI> Reply-To: nopuklic@ndsuvax.UUCP (Blayne Puklich) Organization: North Dakota State University Fargo, ND Lines: 36 In article <554@utacs.UTA.FI> jmh@utacs.UUCP (Juha-Matti Heimonen) writes: [ ... ] > >I am currently using version 1.2d1 and I am quite happy with it (so far!). >There is anyway one thing that annoys me. I *want* to define my DLOGs as >resources but I would also like to have them well fitted to screens of >varying sizes, e.g. in the middle or the right bottom corner of the screen. >How can I get both of these?? > >Juha-Matti Heimonen jmh@utacs.UUCP One way to do this is to load the resource template for the DLOG into a DialogTHndl and fiddle with the boundsRect of the DLOG BEFORE calling GetNewDialog. You can then move it around as you wish by computing a coordinate based either on screenBits.bounds or, as IM vol V says on pp 121-122, GrayRgn's rgnBBox, which will give you the Rgn for all screens attached if you want to place it on a different screen. You need to make the DialogTHndl unpurgeable before playing with it, also. You can stuff the Rect you compute back into the boundsRect, and then call GetNewDialog, which will draw it at the new location. One thing to keep in mind is that if the DLOG has a window definition ID of documentProc, noGropwDocProc, or rDocProc, the title bar is NOT included in the DLOG template's boundsRect, so you'll have to adjust things 20 pixels accordingly. Oh, remember to make it purgeable again if you won't be needing it anymore. ||+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++|| || Blayne Puklich nopuklic@plains.NoDak.edu || || NDSU Student ACM NU087763@NDSUVM1.bitnet || || Chairperson North Dakota State University, Fargo, ND || || || || "Everyone should have a Corvette, I think." || || NOTE: If nopuklic@plains.NoDak.edu bounces, revert to || || nopuklic@ndsuvax.EDU. || ||-------------------------------------------------------------------------||