Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!apple!radius!lemke From: lemke@radius.UUCP (Steve Lemke) Newsgroups: comp.sys.mac.programmer Subject: Re: Help me cheat! Message-ID: <1213@radius.UUCP> Date: 28 Nov 89 20:41:33 GMT References: Reply-To: radius!lemke@apple.com Organization: Radius Inc., San Jose, CA Lines: 37 In article ml10+@andrew.cmu.edu (Michael A. Libes) writes: }Does anyone know how to "force" a window in another program to update, }without any user input? }I am trying to write a screen saver as a Multifinder application (just }for fun) and the only problem I've come across is getting the menubar }and the windows of the foreground application to update. How do the }normal screen savers do it? Must I patch a toolbox call? Try the following code to invalidate the whole screen - that includes all windows open, I think. Anyway, after writing all over the whole screen, my program does the following to update everything. procedure InvalScreen; { invalidates the whole screen } var oldPort: GrafPtr; bfRgn: RgnHandle; bfRect: Rect; begin GetPort(oldPort); bfRgn := NewRgn; SetRect(bfRect, -32000, -32000, 32000, 32000); RectRgn(bfRgn, bfRect); PaintBehind(WindowPeek(FrontWindow), bfRgn); DisposeRgn(bfRgn); SetPort(oldPort); end; }Also, it would be great if I could get the list of windows. The low }memory global, WindowList, is always null in Multifinder. Where did }Apple move it? Don't bother - just try the above code. -- ----- Steve Lemke, Engineering Quality Assurance, Radius Inc., San Jose ----- ----- Reply to: radius!lemke@apple.com (Coming soon: radius.com ...) ----- ----- AppleLink: Radius.QA; GEnie: S.Lemke; Compu$erve: 73627,570 -----