I am trying to load PNGs for HBITMAP. I found this post from stackoverflow. When I run the code I get REGDB_E_CLASSNOTREG
on CoCreateInstance(CLSID_WICPngDecoder, NULL, CLSCTX_INPROC_SERVER, __uuidof(ipDecoder), reinterpret_cast<void**>(&ipDecoder)
. I am using Visual Studio 2012 RC, I've done CoInitlaize
and I am still getting same error what could be possibly wrong?
WIC API suggest that you create decoder from factory, rather than directly using its CLSID
. See IWICImagingFactory interface and sample code there.
You have options to create from file, stream or specifying container format GUID
.