下面用 VC6 来写一个 GdiPlus 的 Demo 工程
Step1:新建一个名为 Demo_GdiPlus 的 MFC AppWizard(exe) 工程
操作步骤:
(1)主菜单File->New...,选择 Projects 选项卡;
(2)在工程类型列表中选中 MFC AppWizard(exe);
(3)Project name 填入 Demo_GdiPlus,按 OK 进入下一页;
(4)选择单文档(Single document)类型的程序框架,按 Finish 完成工程创建工作。
Step2:添加头文件声明
在 StdAfx.h 中添加以下代码:
//
{
{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
typedef unsigned long ULONG_PTR, * PULONG_PTR;
#include < gdiplus.h >
using namespace Gdiplus;
#pragma
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
typedef unsigned long ULONG_PTR, * PULONG_PTR;
#include < gdiplus.h >
using namespace Gdiplus;
#pragma