images in tab controls

I have added an image to a tab ctrl through an image map.  The image looks goofy though because it picks up the background color of the window, instead of just staying the color of the tab control.  Any suggestions?
pfauxAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Nicolay_ChCommented:
Set image background color exactly color of window...

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
udiaCommented:
Nicolay is correct, you should set the image list bk color to be the system bk color.
This is the code which does this:

      m_ImageList.SetBkColor(GetSysColor(COLOR_WINDOW));
0
pfauxAuthor Commented:
this doesn't appear to work right...there is no change to the images background color, even when I change COLOR_WINDOW to COLOR_ACTIVEBORDER, etc.

I even tried setting this when we are adding the image list
m_smlImageList.Add( &m_SmallMap,
   GetSysColor(COLOR_WINDOW) );

and that just causes the background to be a pink color

any suggestions?
0
pfauxAuthor Commented:
figured it out, here is what I finally did, in the spot where I am inserting the image.

m_Tab.GetImageList()->
     SetBkColor(CLR_NONE);
ptr.iImage = 64;
m_Tab.SetItem(1,&ptr);

0
pfauxAuthor Commented:
i'll accept your answer because you are kind of correct.  I did need to set the background but needed to set it to none...so that it would be transparent.  Only found that because the other way did not work.  You did get me into the correct area in the documentation to find the right answer.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.