Transparent icons not transparent ? 
Author Message
 Transparent icons not transparent ?

Hi,

I have an MFC app with a view. Inside the view I have a number of
controls and some icons. All of the icons have a transparent background
so they won't shouldn't up as a box. The problem is the background is
showing up as a different color gray than the window background. So it
is being tranparent but not using the correct color when doing it.
Anybody know how I can get around this ? oe even why it is happening ?

thx

Matt

Sent via Deja.com
http://www.*-*-*.com/



Sat, 05 Jul 2003 07:28:55 GMT  
 Transparent icons not transparent ?

Quote:
>I have an MFC app with a view. Inside the view I have a number of
>controls and some icons. All of the icons have a transparent background
>so they won't shouldn't up as a box. The problem is the background is
>showing up as a different color gray than the window background. So it
>is being tranparent but not using the correct color when doing it.

Matt,

Show a relevant snippet of your code that's loading and painting the
icons.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
My address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow-up email copies.



Sat, 05 Jul 2003 15:50:30 GMT  
 Transparent icons not transparent ?
If it's a different colour grey, I'm guessing that the background in your
icons isn't transparent at all, just painted grey.
Quote:

> Hi,

> I have an MFC app with a view. Inside the view I have a number of
> controls and some icons. All of the icons have a transparent background
> so they won't shouldn't up as a box. The problem is the background is
> showing up as a different color gray than the window background. So it
> is being tranparent but not using the correct color when doing it.
> Anybody know how I can get around this ? oe even why it is happening ?

> thx

> Matt

> Sent via Deja.com
> http://www.deja.com/



Sat, 05 Jul 2003 23:14:34 GMT  
 Transparent icons not transparent ?

Quote:

> >I have an MFC app with a view. Inside the view I have a number of
> >controls and some icons. All of the icons have a transparent
background
> >so they won't shouldn't up as a box. The problem is the background is
> >showing up as a different color gray than the window background. So
it
> >is being tranparent but not using the correct color when doing it.

> Matt,

> Show a relevant snippet of your code that's loading and painting the
> icons.

> Dave

No code just a static resource. A 240 color icon with transparent
background, on an MFC view, on a standard windows98 system gray
background using the picture resource set to icon mode. I am developing
on Win2k which seems to have a different system gray, could this have
something to do with it ? Doesn't seem like it should. The screen is 24
bit color. The icons seem to be trying to be transparent to the
background they just aren't quite the same color. I have tried changing
the windows color scheme and the icon background follows but is still a
slightly different shade. I have even tried updating the display
drivers, but no luck.

Sent via Deja.com
http://www.deja.com/



Sat, 05 Jul 2003 23:55:14 GMT  
 Transparent icons not transparent ?


Quote:
> If it's a different colour grey, I'm guessing that the background in
your
> icons isn't transparent at all, just painted grey.

No, if I change the windows scheme so the background colors change too,
the icon background will change also, but will be a slightly different
shade of the background color.

Sent via Deja.com
http://www.deja.com/



Sun, 06 Jul 2003 00:11:31 GMT  
 Transparent icons not transparent ?

Quote:
>No code just a static resource. A 240 color icon with transparent
>background, on an MFC view, on a standard windows98 system gray
>background using the picture resource set to icon mode. I am developing
>on Win2k which seems to have a different system gray, could this have
>something to do with it ? Doesn't seem like it should. The screen is 24
>bit color. The icons seem to be trying to be transparent to the
>background they just aren't quite the same color. I have tried changing
>the windows color scheme and the icon background follows but is still a
>slightly different shade. I have even tried updating the display
>drivers, but no luck.

I've just tried creating a 256 colour icon and placed it on a dialog -
I can't spot any obvious dis-colored transparent images there. If you
try this, can you see any difference in the transparent areas? Have
you tried your application on totally different hardware (in case it
is a driver quirk)?

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
My address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow-up email copies.



Sun, 06 Jul 2003 01:36:19 GMT  
 Transparent icons not transparent ?


Quote:
> >No code just a static resource. A 240 color icon with transparent
> >background, on an MFC view, on a standard windows98 system gray
> >background using the picture resource set to icon mode. I am
developing
> >on Win2k which seems to have a different system gray, could this have
> >something to do with it ? Doesn't seem like it should. The screen is
24
> >bit color. The icons seem to be trying to be transparent to the
> >background they just aren't quite the same color. I have tried
changing
> >the windows color scheme and the icon background follows but is
still a
> >slightly different shade. I have even tried updating the display
> >drivers, but no luck.

> I've just tried creating a 256 colour icon and placed it on a dialog -
> I can't spot any obvious dis-colored transparent images there. If you
> try this, can you see any difference in the transparent areas? Have
> you tried your application on totally different hardware (in case it
> is a driver quirk)?

Must be a driver quirk. I bumped the colors upto 32 million and
everything looks fine now even though I haven't had to do this on
our other machines.

thx

Matt

Sent via Deja.com
http://www.deja.com/



Sun, 06 Jul 2003 03:49:33 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Icons in image list are not transparent

2. icon and transparent

3. Help!! with transparent color in icons and bitmaps

4. Transparent Icon CStatics

5. Transparent area of Icon

6. Win2k, VisC6, Transparent Icon Colour

7. Overlapping Transparent Icons

8. Transparent icons

9. Transparent background in Icons

10. Transparent Icons on ListView

11. Transparent icons in CTreeCtrl/CListCtrl

12. Transparent Icon

 

 
Powered by phpBB® Forum Software