256 color (or true color) ImageLists showing up as 4-bit in CTreeCtrl?
I have a basicCDialog and aCTreeCtrl in it. When I try to attach icons into it, I run into slight trouble. Even though the bitmap is 256-color or true color, the icons always appear in fixed-palette 4-bit (16-color) in theCTreeCtrl.
The code is roughly this:
CImageList* imageList = new CImageList;imageList->Create(IDB_ICONS, 24, 20, RGB(0xff, 0xff, 0xff));
tree->SetImageList(imageList, TVSIL_NORMAL);
tree->SetImageList(imageList, TVSIL_STATE);
What might be going wrong here? BothCreate() andSetImageList() giveS_OK.
I see there's another overload ofCImageList::Create() that takesILC_COLOR4,ILC_COLOR8,ILC_COLOR24 etc as an argument, but it seems that's only for creatingCImageLists from scratch without loading a ready bitmap into it. (When loading a bitmap, I gatherCreate() should figure out the color depth from the given image.)
Judging from
http://www.codeguru.com/Cpp/controls/imagelist/openfaq/article.php/c9045/
it may require a customCImageList to support true color at least in MSVC6.0, but surely 256 color should work without hassle?
This is MSVC7.1, XP SP 2.

