Board index » delphi » Changing immediately the colors

Changing immediately the colors

Hello,

I want to change immediately the colors in my program (Turbo Pascal for
Windows) without redrawing the
complete surface. On a 256-color-monitor this ist possible with the command
"AnimatePalette" (I use
a palette), but it doesn't work with 16-bit-colors. Can someone help me?
By the way, what is largest number of colors that can be put into a palette?

Thanks in advance!

Ludwig

 

Re:Changing immediately the colors


Quote
Klam wrote:

> I want to change immediately the colors in my program (Turbo Pascal for
> Windows) without redrawing the
> complete surface. On a 256-color-monitor this ist possible with the command
> "AnimatePalette" (I use
> a palette), but it doesn't work with 16-bit-colors. Can someone help me?
> By the way, what is largest number of colors that can be put into a palette?

A palette is simply a list of colours. Windows maintains a palette
when you have 256 colours or less. The 15,16-bit colours are translated
directly from 5+5+6 RGB bits to 8+8+8 bits RGB without a lookup list.
So there is no palette to change.
:-)
--
Franz Glaser, Glasau 3, A-4191 Vorderweissenbach Austria +43-7219-7035-0
Muehlviertler Elektronik Glaser.  Industrial control and instrumentation
http://members.eunet.at/meg-glaser/           mailto:meg-gla...@eunet.at
http://www.geocities.com/~franzglaser/ http://members.xoom.com/f_glaser/

Re:Changing immediately the colors


Thank you very much for this information (I didn't knew it).
So if I understood you well, I can't use a palette in a 16-bit color-mode
(or more); that means the command "AnimatePalette" shows no effect if I
change the colors of a palette?(Why does it exist if it's useless?)
Isn't there any way to change the colors on the display without redrawing
it - like it is possible on a 256-color-monitor with "AnimatePalette"?

Ludwig Klam

Re:Changing immediately the colors


Quote
Klam wrote:

> Thank you very much for this information (I didn't knew it).
> So if I understood you well, I can't use a palette in a 16-bit color-mode
> (or more); that means the command "AnimatePalette" shows no effect if I
> change the colors of a palette?(Why does it exist if it's useless?)
> Isn't there any way to change the colors on the display without redrawing
> it - like it is possible on a 256-color-monitor with "AnimatePalette"?

Oh, this is too much Windows stuff for me :-)))

Please ask this in a Windows programmer newsgroup, like the
Delphi groups. Or try to get information from the Microsoft
homepage. I suggest you look for the MSDN pages.

But - it is also a hardware / video driver issue.

Regards,
--
Franz Glaser, Glasau 3, A-4191 Vorderweissenbach Austria +43-7219-7035-0
Muehlviertler Elektronik Glaser.  Industrial control and instrumentation
http://members.eunet.at/meg-glaser/    http://members.xoom.com/f_glaser/
http://www.geocities.com/~franzglaser/            http://start.at/bedarf

Re:Changing immediately the colors


Quote
Ing. Franz Glaser wrote:

> Klam wrote:

> > Thank you very much for this information (I didn't knew it).
> > So if I understood you well, I can't use a palette in a 16-bit color-mode
> > (or more); that means the command "AnimatePalette" shows no effect if I
> > change the colors of a palette?(Why does it exist if it's useless?)
> > Isn't there any way to change the colors on the display without redrawing
> > it - like it is possible on a 256-color-monitor with "AnimatePalette"?

> Oh, this is too much Windows stuff for me :-)))

> Please ask this in a Windows programmer newsgroup, like the
> Delphi groups. Or try to get information from the Microsoft
> homepage. I suggest you look for the MSDN pages.

> But - it is also a hardware / video driver issue.

> Regards,
> --
> Franz Glaser, Glasau 3, A-4191 Vorderweissenbach Austria +43-7219-7035-0
> Muehlviertler Elektronik Glaser.  Industrial control and instrumentation
> http://members.eunet.at/meg-glaser/    http://members.xoom.com/f_glaser/
> http://www.geocities.com/~franzglaser/            http://start.at/bedarf

I tried some asm-code for changing palettes I used in DOS-programs in a
Windows-environment. It worked but the effects were a little unpredictable. I
managed to change the system-colors which is nice for some time, but not really
what you want.

Other Threads