(2010-08-02 09:46:05)
转载▼
标签:
杂谈
分类: GDI+
bool GetCodecClsid(LPCTSTR lpstrFormat, CLSID &clsid)
{
UINT nNum = 0, nSize = 0;
Gdiplus::GetImageEncodersSize(&nNum, &nSize) == Gdiplus::Ok;
Gdiplus::ImageCodecInfo *pInfo = (Gdiplus::ImageCodecInfo *)malloc(nSize);
if(Gdiplus::GetImageEncoders(nNum, nSize, pInfo) != Gdiplus::Ok)
{
free(pInfo);
}
LPCWSTR lpstr = lpstrFormat;
for(int nIndex = 0; nIndex < nNum;......
阅读全文