我在vs2003里面使用GetImageEncodersSize函数会提示错误,是不是2003里面没有GetImageEncodersSize?
解决方案 »
- 字符串的IP地址怎么转换为ULONG类型?宽字符。
- 多人连接程序 Window 编程问题
- CListCtrl在Report风格下,LVN_ENDLABELEDIT的问题
- 请教: dos下,dir *.tmp 命令不够精确的问题.
- 子类如何调用父类cricheditctrl的onpaint函数
- 请教一个关于NcPaint的问题。
- 离散余弦反变换的实现
- ftp server上的文件增长后,下载下来的文件还是以前的文件,请帮忙看看↓↓↓
- 求教:手头上有一个DLL,我要调用里面的函数得满足哪些要求(假设函数原型已知)。
- 下定决心只学将C(C C++ C#)进行到底!!!!
- 求助~~~
- 一个按钮代码中开启的线程能否在另一个按钮中等待该线程句柄
#include <gdiplus.h>
#include <stdio.h>
using namespace Gdiplus;INT main()
{
// Initialize GDI+.
GdiplusStartupInput gdiplusStartupInput;
ULONG_PTR gdiplusToken;
GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);
UINT num; // number of image decoders
UINT size; // size, in bytes, of the image decoder array ImageCodecInfo* pImageCodecInfo; // How many decoders are there?
// How big (in bytes) is the array of all ImageCodecInfo objects?
GetImageDecodersSize(&num, &size); // Create a buffer large enough to hold the array of ImageCodecInfo
// objects that will be returned by GetImageDecoders.
pImageCodecInfo = (ImageCodecInfo*)(malloc(size)); // GetImageDecoders creates an array of ImageCodecInfo objects
// and copies that array into a previously allocated buffer.
// The third argument, imageCodecInfos, is a pointer to that buffer.
GetImageDecoders(num, size, pImageCodecInfo); // Display the graphics file format (MimeType)
// for each ImageCodecInfo object.
for(UINT j = 0; j < num; ++j)
{
wprintf(L"%s\n", pImageCodecInfo[j].MimeType);
} free(pImageCodecInfo);
GdiplusShutdown(gdiplusToken);
return 0;
}