Well, you did not answer question related to creating a image list.
CImageList has 5 overloaded versions of Create function. Some parameters can
affect how images are displayed.
Also using mask can change image colors.
"Hans-J. Ude" wrote:
"RainMan" <RainMan@online.nospam> wrote
Consider using LoadImage instead of LoadIcon; it will give you more
control
over what device image to load.
Same result using a bitmap. It looks like that:
http://www.chordwizard.de/TabCtrlImage.bmp
To the left is the view inside VS, to the right is the running program. BTW,
the friendly man in the caption bar is the icon from the first approach.
Hans
Second approach:
//-------------------------------------------------------------------------
void CMyPropSheet::OnBnClickedTest()
{
#define RGB_MASK RGB(255,0,255)
TCITEM tci;
CBitmap bmp;
if (bmp.LoadBitmap(IDB_EXTENT))
{
CTabCtrl *pTabCtrl = GetTabControl();
if (pTabCtrl)
{
tci.mask = TCIF_IMAGE;
tci.iImage = m_ImageList.Add(&bmp, RGB_MASK);
pTabCtrl->SetItem(0, &tci);
}
}
}
//-------------------------------------------------------------------------