Re:Working with Palette in Delphi
On Tue, 23 Jan 1996 00:20:25 -0800, Tom Clowers <t...@wolfenet.com>
wrote:
Quote
>If you have been able to sucessfully manipulate the color palette in a
>Delphi application I need your help.
>I am trying to determine if I can pull from a greater number of colors
>for my project when it is running in 256 color mode. One thought
>towards this end was to experiment with the palette. However I have had
>little success in creating, or switching palettes.
First you need to understand the general principles of palettes in
Windows. Look for the PW0777.EXE file at Microsoft's FTP or Web site,
in the SoftLib directory somewhere. It is a self-study course on
palettes.
Next, realize that every control in Delphi can have a palette, and if
it has one, then Delphi automatically selects and realizes it. The
control returns the palette handle with the GetPalette methods. You
can write a control to override this method.
A TBitmap object can have a palette, either by reading it from a file,
copying it from the clipboard, or setting its Palette property to a
palette handle. If a bitmap in a TImage control has a palette, then
Delphi automatically selects and realizes the palette.
--
Ray Lischner (li...@tempest-sw.com)
Tempest Software, Corvallis, Oregon, USA