www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/11/28/12:31:26

Date: Thu, 28 Nov 1996 19:18:45 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Glen Miner <gminer AT Newbridge DOT COM>
Cc: djgpp AT delorie DOT com
Subject: Re: Djgpp and Windoze Refresh
In-Reply-To: <57k8a4$5m9@kannews.ca.newbridge.com>
Message-Id: <Pine.SUN.3.91.961128191530.9387A-100000@is>
Mime-Version: 1.0

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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019