TIP: Click on subject to list as thread! ANSI
echo: delphi
to: BRYAN SMITH
from: GARY
date: 1996-07-31 21:09:00
subject: Palettes

Bryan Smith mentioned this to Gary Weinfurther:
 BS> You are right, I'm working in 256 coulors.  What I don't undertand is 
hy
 BS> on a 256-colour system, the "current system palette" seems to contain 
only
 BS> 16 colours !
Because you have to tell the component's display context that a custom 
palette exists.  To do this, you have to override the GetPalette method to 
reurn a handle to your custom palette.  Then, in your Paint method, you have 
to use the API functions SelectPalette and RealizePalette to activate your 
palette prior to painting.  When you are done painting, use SelectPalette 
again to restore the previous palette of the device.
                                ...Gary
--- GoldED 2.41
---------------
* Origin: The Flying Circus BBS, Farmington Hills, MI. (1:2410/905)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.