- 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);
Using GDI+ with MFC or native C/VC++
最新推荐文章于 2025-08-13 11:39:11 发布