I started with a PNG image. I then split the alpha channel into a grey scale BMP file and converted the PNG into a BMP. I would like to load both BMP files and merge them to give a HBITMAP with an alpha channel:
HBITMAP splash = LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_SPLASH));
HBITMAP splashMask = LoadBitmap(hInstance, MAKEINTRESOURCE(IDB_SPLASH_MASK));
HBITMAP splashAlpha = ....
I found an example of creating a HBITMAP directly from a PNG. It uses IStream and COM to do the import. I'd rather not include more dependencies. Surely there is a better way to do this?