Extract a CBitmap from a CImageList
Posted on 1998-04-17
I've used the resource editor to specify a toolbar-like bitmap (that is, it has about 30 images all concatenated together).
I then use the CImageList.Create() function to load that resource and turn it into an image list for use with tree and list controls, etc:
Create(UINT nBitmapID, int cx, int nGrow, COLORREF crMask);
Problem is, I can't see a way to get an individual CBitmap out of the image list for a specific image; that is,
RetrieveBitmap(CImageList *myList, UINT iImageNumber, &bmpToExtract);
The GetImageInfo() function apparently retrieves the entire bitmap, not just a bitmap for the image I want to extract.
I sure hope there's any easy answer I'm blindly missing....