Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!unix.cis.pitt.edu!brutus.cs.uiuc.edu!apple!well!oster From: oster@well.sf.ca.us (David Phillip Oster) Newsgroups: comp.sys.mac.programmer Subject: Re: Window Manager Message-ID: <17179@well.sf.ca.us> Date: 11 Apr 90 08:54:58 GMT References: <3047@dciem.dciem.dnd.ca> <7617@goofy.Apple.COM> Reply-To: oster@well.UUCP (David Phillip Oster) Organization: Whole Earth 'Lectronic Link, Sausalito, CA Lines: 31 In article <7617@goofy.Apple.COM> chewy@apple.com (Paul Snively) writes: _>In article <3047@dciem.dciem.dnd.ca> juana@dciem.dciem.dnd.ca (Juana _>Chang) writes: _>> After a dialog has been displayed over my windows, chunks of my windows _>> have been erased by the dialog. Which functions should I use to re-draw _>my _>> windows ? _>> _>> Should I use: _>> GetPort(&savePort); SetPort((WindowPtr) event->messaege); _>> BeginUpdate( ptr_mywindow ); _>> re-draw window... _>> EndUpdate( ptr_mywindow ); SetPort(savePort); _>> _>> ????? _> _>Yes. _> That is not quite fair. A better answer would be that you should have code like that in your update event handler, and that if you are not calling your main event handler because you are stuck in some modal dialog, you should pass ModalDialog() or Alert a pointer to a filer function that checks the event->what field of its event argument. If it is an update event and the destination (event-.message) is not the FrontWindow(), then hand it to your main even yhandfler to dispatch to the appropriate window. -- -- David Phillip Oster - Note new address. Old one has gone Bye Bye. -- oster@well.sf.ca.us = {backbone}!well!oster