Is it possible to get bitmap images to show transparent on the tab control? What am I missing? My code is below. Thanks in advance.
void CSHCS_Params_Dlg::InitializeTabCtl(CTabCtrl * _tabTool)
{
TCITEM tcItem;
CImageList *imgl;
CBitmap bmp;
imgl = new CImageList();
imgl->Create(24, 24, ILC_COLOR32 | ILC_MASK, 0, 4);
bmp.LoadBitmap(IDB_BITMAP1);
imgl->Add(&bmp, RGB(255, 0, 255));
bmp.DeleteObject();
bmp.LoadBitmap(IDB_BITMAP2);
imgl->Add(&bmp, RGB(255, 0, 255));
bmp.DeleteObject();
bmp.LoadBitmap(IDB_BITMAP3);
imgl->Add(&bmp, RGB(255, 0, 255));
bmp.DeleteObject();
_tabTool->SetImageList(imgl);
tcItem.mask = TCIF_TEXT | TCIF_IMAGE;
tcItem.pszText = _T("Taps");
_tabTool->InsertItem(0, &tcItem);
tcItem.pszText = _T("Mills");
_tabTool->InsertItem(0, &tcItem);
tcItem.iImage = 2;
tcItem.pszText = _T("Drills - Twist");
_tabTool->InsertItem(0, &tcItem);
tcItem.iImage = 1;
tcItem.pszText = _T("Drills - Spade");
_tabTool->InsertItem(0, &tcItem);
tcItem.iImage = 0;
tcItem.dwState = TCIS_BUTTONPRESSED;
tcItem.pszText = _T("Drills - Braised Tip");
_tabTool->InsertItem(0, &tcItem);
_tabTool->SetCurSel(0);
}
void CSHCS_Params_Dlg::InitializeTabCtl(CTabCtrl * _tabTool)
{
TCITEM tcItem;
CImageList *imgl;
CBitmap bmp;
imgl = new CImageList();
imgl->Create(24, 24, ILC_COLOR32 | ILC_MASK, 0, 4);
bmp.LoadBitmap(IDB_BITMAP1);
imgl->Add(&bmp, RGB(255, 0, 255));
bmp.DeleteObject();
bmp.LoadBitmap(IDB_BITMAP2);
imgl->Add(&bmp, RGB(255, 0, 255));
bmp.DeleteObject();
bmp.LoadBitmap(IDB_BITMAP3);
imgl->Add(&bmp, RGB(255, 0, 255));
bmp.DeleteObject();
_tabTool->SetImageList(imgl);
tcItem.mask = TCIF_TEXT | TCIF_IMAGE;
tcItem.pszText = _T("Taps");
_tabTool->InsertItem(0, &tcItem);
tcItem.pszText = _T("Mills");
_tabTool->InsertItem(0, &tcItem);
tcItem.iImage = 2;
tcItem.pszText = _T("Drills - Twist");
_tabTool->InsertItem(0, &tcItem);
tcItem.iImage = 1;
tcItem.pszText = _T("Drills - Spade");
_tabTool->InsertItem(0, &tcItem);
tcItem.iImage = 0;
tcItem.dwState = TCIS_BUTTONPRESSED;
tcItem.pszText = _T("Drills - Braised Tip");
_tabTool->InsertItem(0, &tcItem);
_tabTool->SetCurSel(0);
}