The following code is from a small test program used to understand how to create and use a CTreeCtrl to create a tree with a button as the image.
All works except no image of the button appears.

CTreeCtrl m_TreeView;
CImageList imgList;
The commented imgList.Create has been tried with no success
//imgList.Create((LPCTSTR)IDB_BUTTON,16, 10, RGB(255, 255, 255));
Latest try
imgList.Create((UINT)IDB_BUTTON,16,5, RGB(155,255,255));
Added the following coe when during debug the imgList shows to have three images but there is only one button bitmap
int iNumberofImages = 0;
iNumberofImages = imgList.GetImageCount();
// iNumberofImages shows a value of three yet there is only one bitmap with one picture.
m_TreeView.SetImageList(&imgList,TVSIL_NORMAL);
TVINSERTSTRUCT tvInsert;
tvInsert.hParent = NULL;
tvInsert.hInsertAfter = NULL;
tvInsert.item.mask = TVIF_TEXT;
tvInsert.item.pszText = _T("ACCEPT - Bah Bah Application");
Creates the top level node in the tree
HTREEITEM hCountry = m_TreeView.InsertItem(&tvInsert);

CString strU;
Inserts the sub nodes
strU = "ACCEPT - Microsoft .Net Framework 2.0";
m_TreeView.InsertItem(TVIF_TEXT, (LPCTSTR)strU,0,0,0,0,0,hCountry,NULL);
strU = "ACCEPT - Microsoft MDAC 2.8";
m_TreeView.InsertItem(TVIF_TEXT, (LPCTSTR)strU,0,0,0,0,0,hCountry,NULL);
strU = "ACCEPT - Microsoft SQL Express 2005";
m_TreeView.InsertItem(TVIF_TEXT, (LPCTSTR)strU,0,0,0,0,0,hCountry,NULL);
// Tree with Text appears but no image of a button.

________________________________________
Jim