Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!decwrl!pa.dec.com!shodha.enet.dec.com!evans.enet.dec.com!bittrolff From: bittrolff@evans.enet.dec.com (Steve Bittrolff) Newsgroups: comp.sys.atari.st.tech Subject: Re: saving screen in a GEM app. Message-ID: <2991@shodha.enet.dec.com> Date: 24 Apr 91 18:53:22 GMT Sender: news@shodha.enet.dec.com Organization: Digital Equipment Corporation Lines: 36 In article <115241.1926@timbuk.cray.com>, marc@sequoia.cray.com (Marc Bouron) writes... > >In article <1991Apr24.012040.22627@netcom.COM>, rcb@netcom.COM (Roy Bixler) writes: >|> >|> I am writing a GEM application based on a dialog box which >|> occasionally has another dialog box written over it. When this >|> 'pop-up' dialog box is done and I have called form_dial() the second >|> time, instead of the original dialog box being restored, the desktop >|> background is restored. Obviously, that doesn't 'cut it'. Is there a >|> way for me to save the background and restore it when I'm done with >|> the 'pop-up' dialog? >|> >|> It looks like the problem is that GEM is not aware that my original >|> dialog box is the background. How do I notify GEM that the background >|> is not the original desktop? I've thought about doing a 'wind_set(0, >|> WF_NEWDESK, ...)' but, if I do that, how would I get the original >|> desktop back when my application is done? >|> >|> Maybe insanity is the best answer. Any suggestions otherwise? There are a couple of other ways to handle this. One that I use is to save the screen area under the dialog box when you put it up and restore it when you put it back, using the blit routines. Specifically, you can use the vro_copyfm() routines. Or you can save each dialog box using the same technique and restore all of it when you get a redraw message. Or you can save the whole screen, although this uses 32K of memory. As far is insanity, I came pretty close when I was first trying to implement this stuff! :^) ~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^ Steve Bittrolff | KlugeMaster bittrolff@pikes.enet.dec.com or | bittrolff@evans.enet.dec.com | | ~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^