home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!spool.mu.edu!agate!stanford.edu!apple!goofy!mumbo.apple.com!gallant.apple.com!seuss.apple.com!user
- From: absurd@apple.apple.com (Tim Dierks, software saboteur)
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: Getting StructureRegion of a dialog. etco
- Message-ID: <absurd-131292142034@seuss.apple.com>
- Date: 13 Dec 92 22:30:12 GMT
- References: <1992Dec13.012252.18463@midway.uchicago.edu> <1992Dec13.012906.18671@midway.uchicago.edu>
- Sender: news@gallant.apple.com
- Followup-To: comp.sys.mac.programmer
- Organization: MacDTS Marauders
- Lines: 33
-
- In article <1992Dec13.012906.18671@midway.uchicago.edu>,
- ttak@quads.uchicago.edu (toki takeuchi) wrote:
- > I want to get the StructureRegion of a dialog before I display
- > the dialog. I.e., I want to get the rectangle of the entire
- > window, including the window structure before the dialog is displayed.
- >
- > I've tried getting the DialogPeek's structure region's boundary
- > box for an invisible dialog (before the dialog is displayed, with
- > the Initially Visible flag off in its DLOG resource), but
- > until I call ShowWindow, its structure region's rect remains
- > as (0,0,0,0).
- >
- > I want to do this because I want to position a dialog in System 6
- > according to the auto-position feature of System 7. System 7
- > seems to position the dialog depending on the rect of the
- > WDEF and not the grafport portrect. Anyone at Apple know the
- > secret???
-
- The structure region generally doesn't get calculated until you
- display the window. You can get the WDEF to figure them out if
- you call it manually, but there's a better solution for this case;
- just move the dialog way off screen and display it behind the
- other windows (so you don't affect the highlighting of your
- windows); you can then examine the structure region, etc, so
- you can determine where to put your dialog.
-
- > Kenji Takeuchi (please respond directly, preferably).
-
- (I emailed this too.)
- (OK, well, not yet, but soon.)
-
- Tim Dierks
- MacDTS, pinball addict
-