CreateDIBSection producing Black Background

Sep 4 2007 6:06 AM
Hi all,

Earlier, I posted something on BitBlitting images on one another. So I tried AlphaBlending. It works. But I can't create masks with it. Which I can only do with BitBlt. The only problem I have is trying to BitBlt an Image with a transparent background onto another image. The transparent background becomes blue. I know this has to do with the alpha channel of the HBitmap and that I need to use BITMAPV5HEADER and CreateDIBSection. But I tried all this, and still no success. There are many resources available for this but it all seems that half the info is given. I would really appreciate is someone can help me on this.

An interesting note is that If I BitBlt from control.CreateGraphics to another control, the transparency is there, however, If I create a DC and Select an HBitmap into it, the  transparent background becomes blue. Maby if someone can provide me with an example it'll help me much.

Thank you
Regards,
Nathanael