Date: Mon, 26 Jun 95 20:50:34 CDT From: csaba AT vuse DOT vanderbilt DOT edu (Csaba A. Biegl) To: gilliard AT lectra DOT fr Subject: Re: grx20 Cc: djgpp AT sun DOT soe DOT clarkson DOT edu From djgpp-bounces AT sun DOT soe DOT clarkson DOT edu Mon Jun 26 08:38:38 1995 To: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: grx20 In function GrBuildCursor, what is pitch ? The offset between successive rows of the cursor bitmap in chars. It is treated as a separate parameter because this makes it possible to use parts of a bigger bitmap. I run my DOS application from Windows. Everything is OK (thaaaaaannnnnnkkks csaba). If i switch back to Windows (Ctrl ESC), everything is ok. But if i switch back to my DOS application, graphic mode is down. Why? Windows only saves the VGA screen in standard 0x1..0x13 VGA modes 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 is most likely the fault of the Windows driver for your card) but the video memory is messed up. The beauty is that your DOS application 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 (I typically use ALT-R) to redraw the screen. If you do that, I suggest that you start all the way from the beginning, with a 'GrSetMode()', as there are a few bad Windows video drivers which do not restore the SVGA graphics modes properly upon the switch back. (ATI mach32 is one example.) Csaba Thanks.