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