添加头文件:

#include <GdiPlus.h>
using namespace Gdiplus;
#pragma comment(lib, "gdiplus.lib")

若编译出现错误,将stdafx.h中 "#define WIN32_LEAN_AND_MEAN             // Exclude rarely-used stuff from Windows headers "注释掉即可

使用GDI+前要进行初始化

GdiplusStartupInput gdiplusStartupInput;
ULONG_PTR gdiplusToken;
GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);//非常重要

 

posted on 2013-06-14 00:16  ximenchuixie  阅读(179)  评论(0编辑  收藏  举报