home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / mac / programm / 14738 < prev    next >
Encoding:
Text File  |  1992-08-30  |  2.0 KB  |  50 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!pageworks.com!world!eff!sol.ctr.columbia.edu!destroyer!gatech!concert!samba!usenet
  3. From: Bathsheba.Grossman@bbs.oit.unc.edu (Bathsheba Grossman)
  4. Subject: Re: OK buttons overlaying PICTs:  Help, please
  5. Message-ID: <1992Aug30.020553.4934@samba.oit.unc.edu>
  6. Sender: usenet@samba.oit.unc.edu
  7. Nntp-Posting-Host: lambada.oit.unc.edu
  8. Organization: Extended Bulletin Board Service
  9. References: <1992Aug29.184834.37666@ux1.cts.eiu.edu>
  10. Date: Sun, 30 Aug 1992 02:05:53 GMT
  11. Lines: 37
  12.  
  13. In article <1992Aug29.184834.37666@ux1.cts.eiu.edu> cfejm@ux1.cts.eiu.edu (John Miller) writes:
  14. >What am I missing?  Creating a simple modal dialog in ResEdit, I have a
  15. >PICT that covers the whole dialog area.  My OK dismissal button needs to
  16. >sit on top of the PICT.  Either the button gets overdrawn or doesn't
  17. >respond to clicks--depending on numbering of DITL items.
  18.  
  19. Your button should be responding to clicks even when numbered >= 2
  20. (provided it's enabled and all); make sure your code is responding
  21. correctly to ModalDialog returning 2.  The thing to watch when the OK
  22. button isn't #1 is that the standard filterProc maps return to item 1 being
  23. hit, so you'll have to write a filterProc to correct that.
  24.  
  25. Another alternative would be to make the OK button #1 and prevent it from
  26. being overdrawn by having your filterProc do the updating.  
  27. So in the filterProc you'd have something like
  28.  
  29. ...
  30. case updateEvt:
  31.     BeginUpdate(dlg);
  32.     DrawPicture(pictureHandle);
  33.     DrawControl(buttonHandle);
  34.     EndUpdate(dlg);
  35.     return(1);
  36. ...
  37.  
  38. Six of one, half a dozen of the other.  If you're actually using Alert()
  39. the second would be the way to go (though it loses the heavy outline on
  40. the OK button).
  41. I guess that doesn't exactly answer your question...but I felt there was a
  42. need to know.  Good luck.
  43.  
  44. -Sheba
  45. --
  46.    The opinions expressed are not necessarily those of the University of
  47.      North Carolina at Chapel Hill, the Campus Office for Information
  48.         Technology, or the Experimental Bulletin Board Service.
  49.            internet:  bbs.oit.unc.edu or 152.2.22.80
  50.