GDI+ problemos
-
Consider the following (i've cut things for brevity)... using namespace Gdiplus; CImageList img; img.Create(IDB_USERBUTTONS,32, 52, RGB(192,192,192)); CLSID bmpClsid; if (GetEncoderClsid(L"image/bmp", &bmpClsid) == -1) { ASSERT(FALSE); } IMAGEINFO *i; for (long t = 0; t < numbuttons; t++) { HICON bibi = ImageList_img.ExtractIcon(t); HICON bibi2 = CopyIcon(bibi); Bitmap image(btn.GetIcon()); s = image.Save(name.AllocSysString(), &bmpClsid, NULL); } So, in effect, I'm trying to use the Bitmap class' constructor to load an image from a HICON which itself derives from an ImageList (ExtractIcon). However, although this should work (and i can use the HICON on a button for example) the Bitmap constructor simply blows up, trashes the stack and leaves me with nothing useful to work with. Passing a HICON from an icon resource... works. Why? It seemed like a fine idea to parse an imagelist into a bunch of disk-based image files... :wtf: Tim Stubbs