delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/05/20/22:00:41

From: Shawn Hargreaves <Shawn AT talula DOT demon DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: OUT in protected mode.
Date: Wed, 20 May 1998 20:51:46 +0100
Organization: None
Message-ID: <U+ui1XASRzY1Ew8C@talula.demon.co.uk>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 980520163006 DOT 26283C-100000 AT is>
<Pine DOT LNX DOT 3 DOT 96 DOT 980520174040 DOT 505C-100000 AT Vpg14 DOT vpg DOT hu>
NNTP-Posting-Host: talula.demon.co.uk
MIME-Version: 1.0
Lines: 32
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Archee/CoNTRACT writes:
>I tried to modify the palette registers in TEXT mode running in a dos
>BOX(window) on my 800x600 16bit/pixel screen.
>
>I have changed the backgorund color. Win95 filled the whoole window, with
>the color. 
>
>When I did it in 320x200x256 mode in win95 800x600x256 color, I 
>filled the whoole palette with BLACK.
>I got my black window, but the taskbar was still grey.

I think you are a little bit confused about what is happening when you
run a DOS program in a window. This is essentially an emulator, and you
don't have direct access to any of the video hardware: otherwise how
would it be able to make sure that your graphics were just drawn inside
this window? So when you write to the palette registers, this is trapped
by the win95 device drivers and used to do something totally different.
You can never have direct access to the palette while running in a
window, because this would corrupt the rest of the Windows interface
(and wouldn't work at all if the system is running in a truecolor mode).
You are very lucky that win95 is correctly emulating the palette change
inside the DOS window (that doesn't work properly on most machines), but
there is no way that it will ever let you change the global system
colors.

Solution: don't run your program in a window if you want to mess with
the palette.


--
Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/
"Miracles are nothing if you've got the wrong intentions" - Mike Keneally

- Raw text -


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