[RESOLVED] 24bit Bitmaps in an MFC Tree-view Control
Hello all, Thank you in advance. I am writing an application wherein there is a dialog box in which I have placed a Tree-view Control (drag and drop visual control into the dialog box in DevStudio). What I want to know is how do I get the tree-view control to display any bitmaps beyond 4bit Bitmaps.
I would like to utilize greater depth of color and the nicer images that are available these days . . . Any one know how to achieve this?
Thanks again,
Perfect Health and Clarity of Mind,
Victor
Re: 24bit Bitmaps in an MFC Tree-view Control
Tree control uses image list(s) with the images to display. While creating the image list you can choose also the depth of color. See CImageList::Create with nFlags parameter
Re: 24bit Bitmaps in an MFC Tree-view Control
Yes, this is true, but the issue with that approach, is that the Create method that accepts the style constant for color depth doesn't allow for setting a transparent mask. And the Create method that allows a transparent mask doesn't allow for color depth. Kind of a catch-22.
Thanks again, though, I do appreciate your time and efforts.
--Victor
Re: 24bit Bitmaps in an MFC Tree-view Control
Did you look at the CImageList::Add method?
Re: 24bit Bitmaps in an MFC Tree-view Control
No, I did not. I have been creating the image list with the image all at once. Very remiss of me. Thank you this works just fine.
Many Thanks,
--Victor
Re: [RESOLVED] 24bit Bitmaps in an MFC Tree-view Control