[programming] Re: Invisible Bitmaps for res files??

  • From: Erwin Dokter <edokter@xxxxxxx>
  • To: programming@xxxxxxxxxxxxx
  • Date: Tue, 21 Aug 2001 23:20:46 +0200

John wrote:
> 
> Well today I noticed the tree I was working on always draws the bitmaps or 
> Icons from my RES file with a white background.  That is fine for those who 
> set clWindow color to white in Windows, however it looks odd with other 
> colors.   I spent some time looking through calmira source to see if it had a 
> way to replace the background color of a bitmap then noticed calmira does the 
> same thing in explorer.  So I was wondering if anyone knows if it is possible 
> to replace all the White colors in a bitmap
> 
> Any help would be appreciated.  If it can not be done, well I suppose it is 
> not a major issue, but would be nice :)

Calmira (3.12) uses the following method:

* Load bitmap from resource.
* Use the ReplaceColor method from misculil.pas to replace
  the background color to the current tree color.
* If a color change occurs, repeat the above
  (don't forget to free the old one).

The bitmap should have a distinct background color that is not used in
the visible parts of the bitmap (ie. clCyan).

-- Erwin Dokter
   mailto:edokter@xxxxxxx
   http://members.home.nl/edokter
To unsubscribe, send a message to programming-request@xxxxxxxxxxxxx with the 
words "unsubscribe"  (without quotes) in the subject feild.  OR visit 
http://freelists.org/

Other related posts: