Post by eric How can we do that? How to load a PNG file into a HBITMAP?
Depending upon platform and usage requirements one option that comes to mind is SHLoadImageFile (an API documented on MSDN at http://msdn.microsoft.com/en-us/library/aa455003.aspx). Its usage is fairly straight forward:
However the API is limited if you want to deal with transparency and alpha blending etc. In that case on a Windows Mobile 5.0 or higher device you may like to investigate the COM based Imaging API (http://msdn.microsoft.com/en-us/library/ms879887.aspx).
I have a code snippet / sample application demonstarting the use of this API available on my blog at http://www.christec.co.nz/blog/archives/361