Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!usc!apple!stevec From: stevec@Apple.COM (Steve Christensen) Newsgroups: comp.sys.mac.programmer Subject: Re: UpdateMyWindow(), Any ideas? Message-ID: <46457@apple.Apple.COM> Date: 10 Nov 90 01:08:49 GMT References: <2828.273adecd@miavx1.acs.muohio.edu> Organization: Apple Computer Inc., Cupertino, CA Lines: 24 rapickering@miavx1.acs.muohio.edu writes: >[...] >The problem: I need to be able to update the window. > I use ShowWindow() and HideWindow(), I realize I could just >close the window and re-open it, but that's really silly. > >Anyone have a 'standard' way of updating a window. I just want to erase the >whole thing everytime I call my display function. How about setting up your update routine like this? void UpdateMyWindow(WindowPtr theWindow) { SetPort(theWindow); BeginUpdate(theWindow); EraseRect(&theWindow->portRect); // do any drawing here EndUpdate(theWindow); } steve