Board index » delphi » Repainting Graphics on the Canvas

Repainting Graphics on the Canvas

I have an application that paints the background of my dialogs with
kind of a marbled effect.  It looks great at frist, but as soon as I
go to another window, and then return to the previous window.  The
background color appears washed out. I have forced repaints using
Invalidate, and Refresh, but this seems to do no good.  Does anyone
have any suggestions as to how to keep the bitmaps looking good
throughout the exectution of an application.

Any help is greatly appreciated.

Please mail responses to LNorw...@Msn.Com if possible.

Thank you,
Lan Norwood

 

Re:Repainting Graphics on the Canvas


Quote
Lan Norwood wrote:
> I have an application that paints the background of my dialogs with
> kind of a marbled effect.  It looks great at frist, but as soon as I
> go to another window, and then return to the previous window.  The
> background color appears washed out. I have forced repaints using
> Invalidate, and Refresh, but this seems to do no good.  Does anyone
> have any suggestions as to how to keep the bitmaps looking good
> throughout the exectution of an application.

Add your painting stuff to your dialogs OnPaint event. This event
is allways executed when your window needs painting.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Ari Hirviniemi, Lappeenranta, Finland (ari.hirvini...@ktieto.fi)
All my opinions and comments are personal and have nothing to do
with my employer.

Re:Repainting Graphics on the Canvas


Quote
LNorw...@msn.com (Lan Norwood) wrote:
>I have an application that paints the background of my dialogs with
>kind of a marbled effect.  It looks great at frist, but as soon as I
>go to another window, and then return to the previous window.  The
>background color appears washed out. I have forced repaints using
>Invalidate, and Refresh, but this seems to do no good.  Does anyone
>have any suggestions as to how to keep the bitmaps looking good
>throughout the exectution of an application.

        Have you tried overriding the GetPalette method for the form to
something that returns the right palette for the bitmap in question?

--
David Ullrich
Don't you guys find it tedious typing the same thing
after your signature each time you post something?
I know I do, but when in Rome...

Other Threads