Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!lll-winken!uunet!littlei!omepd!davidl From: davidl@intelob.intel.com (David Levine) Newsgroups: comp.sys.mac.programmer Subject: Saving area under dialog boxes (Re: WingZ) Message-ID: Date: 28 Apr 89 15:04:19 GMT References: <598@eutrc3.UUCP> <1774@ccnysci.UUCP> Sender: news@omepd.UUCP Organization: BiiN Information Systems, Hillsboro, Oregon Lines: 40 In-reply-to: aberg@math.rutgers.edu's message of 27 Apr 89 14:36:06 GMT In newsgroup comp.sys.mac, in article aberg@math.rutgers.edu (Hans Aberg) writes: > >(Would it be a stupid idea to BitCopy the area where the dialogue box > >will apear into an array, then display the dialogue box, remove it > when > >done and BitCopy the array back to the window? Would have saved me > >another 2 minutes) > > >>Not to argue with the other points (I don't have WingZ), but this is definitely > >>a Terrible Bad Awful Idea, and the Apple Thought Police will lock you up if > >>you do this. > > The Finder, and the earlier systems actually work like this: By > temporarily saving the portion where a dialog box or or menu pops up, > and then copying it back again. In a multitasking environment this > does not work, because some other application may decide to change > the graphics in the area temporarily saved. This is in fact reason to > why all processes used to start hanging when pressing the mouse button > in earlier systems. OK, I've been following this discussion for a while, and I don't understand the problem. Yes, it would be a Bad Idea to CopyBits from the SCREEN to a buffer and then restore after the dialog goes away. But the original poster seems to have been talking about the application copying the affected area of ITS OWN WINDOW to a buffer and then restoring ITS OWN WINDOW. What could be wrong with that? It seems a fairly standard technique. (Actually, an application with complicated drawings should keep a copy of its window in an offscreen bitmap at all times, and blit it to the screen whenever it's needed. Right?) Warning: I'm coming at this from recent experience with the X Window System. I may be making invalid assumptions about the way that the Mac works. Please enlighten me! David D. Levine BBBBBBBBB IIII IIII NNN NNNN TM Senior Technical Writer BBBB BBBB iiii iiii NNNN NNNN BBBBBBBBB IIII IIII NNNNNNNNN UUCP: ...[!uunet]!tektronix!biin!davidl BBBB BBBB IIII IIII NNNN NNNN MX-Internet: BBBBBBBBB IIII IIII NNNN NNN ARPA: <@iwarp.intel.com:davidl@intelob.intel.com>