Kanru’s 探險日誌

這裡應該會放一些我每日遊覽的站台及一些心得,就當作是我的學習筆記吧^^。

Archive for the ‘windows’ tag

MFC 使用 GDI+

without comments

首先要 include gdiplus.h,然後東西都在 Gdiplus namespace 裡面,要記得 link 到 gdiplus.lib

可以在 stdafx.h 寫

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

然後使用前要先呼叫 GdiplusStartup

GdiplusStartupInput gdiplusStartupInput;
ULONG_PTR gdiplusToken;
GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);

程式結束時要呼叫 GdiplusShutdown

GdiplusShutdown(gdiplusToken);

Written by kanru

April 2nd, 2008 at 9:23 pm

Posted in Programming

Tagged with , ,