您的位置:首页 > 编程语言 > C语言/C++

Using GDI+ with MFC or native C/VC++

2011-03-18 21:01 288 查看
Add the following line to your stdafx.h
#include <gdiplus.h>
using namespace Gdiplus;
#pragma comment(lib, "gdiplus.lib")


Intialize the GDI+ resources. Add this to your
CWinApp
derived class as member:
GdiplusStartupInput gdiplusStartupInput;
ULONG_PTR gdiplusToken;

At
InitInstance()
, add:

GdiplusStartup(gdiplusToken, gdiplusStartupInput, NULL);


Your application is ready to consume GDI+ now.

Upon exit, release GDI+ resources. Add the following line to
ExitInstance()
:
GdiplusShutdown(gdiplusToken);
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: