home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / mac / programm / 18223 < prev    next >
Encoding:
Text File  |  1992-11-10  |  1.8 KB  |  36 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!nih-csl.dcrt.nih.gov!FAXCSL!FIXER
  3. From: fixer@faxcsl.dcrt.nih.gov (Chris Spiral Catfish Tate)
  4. Subject: Re: Spurious invalidation
  5. Message-ID: <1992Nov10.155449.14655@alw.nih.gov>
  6. Sender: postman@alw.nih.gov (AMDS Postmaster)
  7. Reply-To: fixer@faxcsl.dcrt.nih.gov
  8. Organization: Computer Systems Laboratory, DCRT, NIH
  9. References: <1992Nov6.170232.21241@alw.nih.gov> <absurd-061192133636@seuss.apple.com> <1992Nov7.172136.7170@athena.mit.edu>,<1992Nov7.221521.21889@samba.oit.unc.edu>
  10. Date: Tue, 10 Nov 1992 15:54:49 GMT
  11. Lines: 23
  12.  
  13. Thanks to everyone who responded, either on the net or via email.
  14.  
  15. In summary, what's happening is that indeed, SetCTitle() is *both* redrawing
  16. the control with its new title *and* causing an update event in the dialog.
  17. I'm not quite clear on why it has to generate the update event, but that's
  18. beside the point.
  19.  
  20. The update event is causing all userItem procedures installed for the dialog
  21. to be called, whether or not they actually intersect the updateRgn established
  22. by the invalidation of the control's bounding rectangle.  Checking to see
  23. whether each userItem actually *needs* to be redrawn prevents having to wade
  24. through all that (slow, DrawString) drawing unnecessarily.
  25.  
  26. If you're absolutely sure you don't have to update anything else when the
  27. control changes its title, you can also call ValidRect() on its rectangle
  28. immediately following the call to SetCTitle(), and the update will be
  29. "cancelled."
  30.  
  31. ------------------------------------------------------------------------------
  32. Christopher Tate             | The Leadfoot Collection, Continued:
  33. Management System Designers  |        * Red Barchetta (Rush)
  34.                              |        * Old Time Rock And Roll (Bob Seeger)
  35. fixer@faxcsl.dcrt.nih.gov    | Because driving fast is a cathartic experience.
  36.