Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!radius!lemke From: lemke@radius.com (Steve Lemke) Newsgroups: comp.sys.mac.programmer Subject: Re: Forcing a screen update. Message-ID: <1320@radius.com> Date: 3 Sep 90 21:17:45 GMT References: <7007@milton.u.washington.edu> Distribution: comp.sys.mac.programmer Lines: 38 lshupe@milton.u.washington.edu (Larry Shupe) writes: >How does one force a mac to redraw the entire desktop (under Multifinder)? >Screen savers and Stuffit Deluxe do this, but I can't figure it out. How about this little gem? I use this to invalidate the screen, and since "bigRect" is soooo big, it should basically invalidate the entire desktop. Now that I look at it, I'm not sure why the GetPort and SetPort are there since I didn't change the port anywhere, but I'm too lazy to take it out and see if it still works... Have fun. procedure InvalScreen; { invalides the whole screen } var oldPort: GrafPtr; bigRgn: RgnHandle; bigRect: Rect; begin GetPort(oldPort); bigRgn := NewRgn; SetRect(bigRect, -32000, -32000, 32000, 32000); RectRgn(bigRgn, bigRect); PaintBehind(WindowPeek(FrontWindow), bigRgn); DisposeRgn(bigRgn); SetPort(oldPort); end; >Eternal gratefulness, No problem - in fact, I didn't write the above - it was borrowed/translated from assembly language that somebody else wrote. >Larry Shupe >lshupe@milton.u.washington.edu --Steve -- ----- Steve Lemke, Engineering Quality Assurance, Radius Inc., San Jose ----- ----- Reply to: lemke@radius.com (Note: NEW domain-style address!!) -----