// filename: import_gdiplus.h
// author: enic
// date: 2013-04-18
#pragma once
#include <GdiPlus.h>
#pragma comment(lib,"GdiPlus.lib")
namespace {
class CAutoInitGdiPlusEnvionment
{
public:
CAutoInitGdiPlusEnvionment()
{
Gdiplus::GdiplusStartup(&m_gdiplusToken, &m_gdiplusStartupInput, NULL);
}
~CAutoInitGdiPlusEnvionment()
{
Gdiplus::GdiplusShutdown(m_gdiplusToken);
}
private:
Gdiplus::GdiplusStartupInput m_gdiplusStartupInput;
ULONG_PTR m_gdiplusToken;
};
static CAutoInitGdiPlusEnvionment autoInitGdiPlus;
};