Discussion:
Creating a transparent picture control
(too old to reply)
b***@yahoo.com
2006-11-28 09:48:46 UTC
Permalink
Hi,

I have added a picture control to my dialog and set its type to bitmap.
I then imported a bitmap to my resouce and set my picture contol to
display this image. I'd like this image to be transparent, so that the
white background does not diplay. How do I do this?

Thanks for your help,

Barry.
b***@yahoo.com
2006-11-28 14:44:33 UTC
Permalink
Post by b***@yahoo.com
Hi,
I have added a picture control to my dialog and set its type to bitmap.
I then imported a bitmap to my resouce and set my picture contol to
display this image. I'd like this image to be transparent, so that the
white background does not diplay. How do I do this?
Thanks for your help,
Barry.
Hi again,

I still havent fixed this problem. My bitmap has a black background,
with a green plus symbol in the middle. It is 50 by 50 pixels. The
picture control is 100 by 100 on my dialog. When I set the picture
control transparency to false, the picture control is transparent
except where the black and green bitmap appears in the center of it.
When I set the transparency to true, then the full picture control
becomes black (100 by 100), with the green plus in the middle. How can
I make it the control transparent instead, with simply a green plus
symbol on a grey (dialog color) background?

Thanks,

Barry.
AliR (VC++ MVP)
2006-11-28 16:36:29 UTC
Permalink
As far as I know you will not be able to do that with a picture control. You
will either have to use Masks or TransparentBlt to do that.

AliR.
Post by b***@yahoo.com
Hi,
I have added a picture control to my dialog and set its type to bitmap.
I then imported a bitmap to my resouce and set my picture contol to
display this image. I'd like this image to be transparent, so that the
white background does not diplay. How do I do this?
Thanks for your help,
Barry.
Continue reading on narkive:
Loading...