Problem with CTreeCtrl::SetImageList()

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



I have a class derived from CTreeCtrl that I would like to change
the images of using SetImageList(). Code in OnInitDialog() of the
class that has the CTreeCtrl as a member:

CBitmap bmp;
int res;
CImageList* img;

res = bmp.LoadBitmap(IDB_IMAGE_BITMAP);
m_imglist = new CImageList;
res = m_imglist->Create(16, 14, ILC_COLOR24, 1, 0);
res = m_imglist->Add(&bmp, RGB(255, 255, 255));
img = m_TreeCtl->SetImageList(m_imglist, TVSIL_NORMAL);

All return values indicate success, but there are no images displayed.
Anything I'm missing?

Thanks,
Drew


.