2. Add the following line to stdafx.h:
#include <gdiplus.h>3. Intialize the GDI+ resources. Add this to your CWinApp derived class as member:
using namespace Gdiplus;
#pragma comment(lib, "gdiplus.lib")
GdiplusStartupInput gdiplusStartupInput;At InitInstance(), add:
ULONG_PTR gdiplusToken;
GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);4. Your application is ready to consume GDI+ now.
// note: GdiplusStartup() should be added before the
// following sentence:
CWinApp::InitInstance();
5. Upon exit, release GDI+ resources. Add the following line to ExitInstance():
GdiplusShutdown(gdiplusToken);
1 comment:
Post a Comment