🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.pascal.delphi.components.misc
Article #7

Delphi1 Colour Palette problems :-{ Can you help?

#7
From: Rob Wilson
Date: Sun, 01 Feb 1998 00:00
33 lines
2007 bytes
Hi,

I have been lucky so far I guess not to have any real problems with
palettes - considering I use them to calculate most of my program :-)

I have now unfortunately hit a problem.  On FormMain I have an image
called Image1 and the image colours get affected when my other form
FormOverlay is dispayed over it.  When I close FormOverlay the image
in Image1 (on FormMain) does not update its colours :-(

I have tried Image1.Refresh, and
RealizePalette(FormMain.Image1.Handle); or I might have done
RealizePalette(FormMain.Image1.Picture.Bitmap.Palette)

But it didn't make any difference.  However I don't believe the
palette is actually corrupted since if I load another form of mine, it
messes around ALOT with refreshing other forms (naughty perhaps), and
somehow FormMain.Image1 refreshes 90% of the time ? :-{

Please, Please, Please help.  I don't understand 'handles' and 'DCs'
so small code examples would be GREAT!  

One other thing, I did expect RealizePalette to work, does anyone know
why it didn't? Also what .Handle or .Palette do I actually use as a
parameter for Timage when dealing with the API??

Your help will be Hugely appreciated,

Thanks guys (and guy-esses)

Rob
RPW@MHS.COMPD.COM
Technical Details
Message-ID: <34d46190.14081122@LINUX.COMPD.COM>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 109d99,9aa7ecbe3d32db30,start
X-Google-Attributes: gid109d99,public
X-Google-Thread: 10a296,9aa7ecbe3d32db30,start
X-Google-Attributes: gid10a296,public
X-Google-Thread: f973b,9aa7ecbe3d32db30,start
X-Google-Attributes: gidf973b,public
From: RPW@MHS.COMPD.COM (Rob Wilson)
Subject: Delphi1 Colour Palette problems :-{ Can you help?
Date: 1998/02/01
Message-ID: <34d46190.14081122@LINUX.COMPD.COM>
X-Deja-AN: 321052964
Content-Transfer-Encoding: 7bit
MIME-Version: 1.0
X-NNTP-Posting-Host: linux.compd.com [193.195.210.97]
Content-Type: text/plain; charset=us-ascii
Newsgroups: comp.lang.pascal.delphi.components.misc,comp.lang.pascal.delphi.components.usage,borland.public.delphi.graphics