Mail Archives: djgpp/1998/05/20/22:00:41
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 -