home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / mac / programm / 19751 < prev    next >
Encoding:
Internet Message Format  |  1992-12-13  |  1.9 KB

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