Re: Drawing an icon so that a particular color is transparent

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Draw it as a transparent color! Use the "Screen Color" as the color (that's the little
thing that looks like a display screen and is green)
joe

On Sun, 03 Aug 2008 17:17:04 -0400, Edward Diener <eddielee_no_spam_here@xxxxxxxxxxxxxx>
wrote:

In VS 2008 in a project I create an icon as a resource in various image
formats using the VS 2008 icon editor. In my code I load the icon with
LoadImage and draw it with DrawIconEx on my WM_PAINT's DC.

The image draws in the correct place but I want a particular color in
the image, white, to be transparent so the image looks better against
the background brush of the window, which is a shade of blue.

Is there a way of making a particular color of the icon to show as
transparent, so the background color of the window shows through it ?

I could try to change the particular color in the icon to the background
color of the window, but I would like a more generic way of doing this
if possible. Thanks !
.



Relevant Pages

  • Re: icon background is not transparent when aero is enabled in vista
    ... i make a icon using vc2005, and the backgournd of icon is transparent. ... draw icon on the bitmap, and then draw bitmap to dialog's dc. ... Why are you putting something on the clipboard? ...
    (microsoft.public.vc.mfc)
  • icon background is not transparent when aero is enabled in vista
    ... i make a icon using vc2005, and the backgournd of icon is transparent. ... draw icon on the bitmap, and then draw bitmap to dialog's dc. ...
    (microsoft.public.vc.mfc)
  • about icon background in vista
    ... i make a icon using vc2005, and the backgournd of icon is transparent. ... draw icon on the bitmap, and then draw bitmap to dialog's dc. ...
    (microsoft.public.vc.mfc)
  • drawing image as a partly transparent one
    ... I have an icon I want to draw onto the screen, but I want to streatch it out ... to be about 256x256 and make it about 75% transparent how would I go about ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Graphic converter query - transparency
    ... Well, you can, but that isn't what the finder uses for transparent ... icon square that you didn't want to count as `part of the icon'. ... that was an odd thing looking at the manuals. ... TeX isn't that big. ...
    (uk.comp.sys.mac)