Newsgroups: comp.sys.mac.programmer
Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!caen!mondo.engin.umich.edu!davids
From: davids@mondo.engin.umich.edu (David Snearline)
Subject: Re: QuickDraw before ModalDialog
Message-ID: <1991May9.192709.6959@engin.umich.edu>
Sender: davids@mondo.engin.umich.edu (Davids Snearline)
Organization: University of Michigan Engineering
References: <11147@bunny.GTE.COM>
Date: Thu, 9 May 1991 19:27:09 GMT

In article <11147@bunny.GTE.COM> CAH0@bunny.gte.com (Chuck Hoffman) writes:
>Running 6.0.7, using THINK C.  I have my "About" information in a dialog 
>box used with ModalDialog.  I first do some QuickDraw in the box (copybits 
>from the ICN#, and a dark border around the Okay button) before invoking 
>ModalDialog.  If Pyro! 4.0 gets the screen, then gives it up again, my 
>QuickDraw stuff seems to go away.  I'm not able to detect any events while 
>ModalDialog is running, and wouldn't have a way to redraw the box during 
>ModalDialog anyway.  Am I destined always to lose the QuickDraw stuff?  
>Should I InvalRect the box?  Is there a better way?

I suggest that you call ModalDialog with a filterProc as described in
Inside Mac I p. 415.  If you are receiving an update event, draw your
extra items.  If you get an update event, draw your items and then return
false for your function so that ModalDialog handles the event.

An alternative approach is to declare a disabled userItem for the ICN#
and the border, and set the procedure pointer with SetDItem.

--- David ---

--
David Snearline
CAEN Network Operations
University of Michigan Engineering
