views:

35

answers:

1

I've searched around using google but I'm completely confused on how to load an image (PNG in my case) from resource and then converting it to a bitmap in memory for use in my splash screen. I've read about GDI+ and libpng but I don't really know how to do what I want. Could anyone help?

+1  A: 

GDI+ supports PNG directly. See here and here.

EDIT: The GDI+ documentation offers some advice for how to use GDI+ in a DLL. In your case, the best solution is probably to define initialisation and teardown functions that the client code is required to call.

Marcelo Cantos
Okay. It seems that I can't use GDI+ for what I'm doing since this is all done in DllMain and the functions called by it. Do you have any other suggestions?
kotarou3
I would've done that (I read it) if I could have editied the program calling the dll, but I can't. So I don't really think I can use GDI+. I'm currently looking into using WIC to convert my PNG to a HBITMAP
kotarou3