Re: ImageList_GetImageInfo - alter the bitmap(s) ?
"R.Wieser" <[email protected]>
| Newsgroups | alt.comp.os.windows-xp,alt.windows7.general,comp.os.ms-windows.programmer.win32 |
|---|---|
| Organization | A noiseless patient Spider |
| Message-ID | <[email protected]> |
Newyana2, > but the docs say GetImageInfo returns an ImageInfo structure, which > includes an hBitmap. Indeed it does. Having the bitmap(s) is where my problems started. :-\ > With that you can call things like GetDIBits, SetDIBits, etc. Yep, I found the first one too (as well as GetBitmapBits). But I realized that it takes a *lot* of work to be able to create something generic from it (for instance, it would need handlers for all 6 BPP modi). Also SetDIBits needs a BITMAPINFO structure filled in with stuff I /somehow/ would need to extract/copy from the origional bitmap. The easier way (I think) would be to use CopyBitmap, load it into a memoryDC* and use that to make the alterations on. * which I would need to make sure it would have the same configuration (Image List Creation Flags) as the one the ImageList was created with. In short: another problem. ... but that than has a "how do I get it back into the origional bitmap/imagelist ?" problem. I was hoping that the MS way would show me a simple, smart way to circumvent all that clumsy work. By the way: for one test approach I invoked "the dark arts" and retrieved the memoryDC(s) the ImageList uses internally. Drawing on them works as expected, very easy. Though there are a number of gotya's to recon with. As well as the use of "the dark arts" ofcourse. :-) Regards, Rudy Wieser