Date: Thu, 28 Nov 1996 19:18:45 +0200 (IST) From: Eli Zaretskii To: Glen Miner Cc: djgpp AT delorie DOT com Subject: Re: Djgpp and Windoze Refresh In-Reply-To: <57k8a4$5m9@kannews.ca.newbridge.com> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On 28 Nov 1996, Glen Miner wrote: > However, there have been confirmed allegations that my program fails to > correctly redraw the screen when it is placed in the background and then > brought to the foreground again. The following excerpt is from the DJGPP FAQ list. I don't know whether this is true for Windows 95, and if so, what are your options other than the ``redraw screen'' thingy suggested below. 10.3 Graphics screen restoring under Windows ============================================ **Q*: When I switch away from my DJGPP program under Windows, then switch back to it, graphics mode is down, or my screen is all messed up. Why?* *A* : Windows only saves the VGA screen in standard VGA modes (1..13h) when you switch away from a DOS application. In any other mode it only saves/restores the video mode *number*, but not the actual screen contents. Your application is most likely still in the proper video mode (if not, it's probably the fault of the Windows driver for your SVGA card), but the video memory is messed up. The beauty of all this is that your program has no way of knowing that the screen has been taken away and then returned to it. The only reasonable thing to do is to dedicate a "hotkey" in your application (e.g., `Alt-R') whose action is to redraw the entire screen. If you do that, it's best to start all the way from the beginning, with a call to `GrSetMode', as there are a few bad Windows video drivers which do not restore SVGA graphics modes properly upon the switch back.