在VC++6.0下設定GDI+(最簡介的方法)

來源:互聯網
上載者:User

1.下載(GDI+ for VC6.0 SDK)GDIPlus檔案將其中的Includes和Lib中的檔案拷到vc目錄下的Includes和Lib檔案夾中.
   :http://www.codeguru.com/code/legacy/gdi/GDIPlus.zip(引用他人的)

2.在你將要使用GDI+的工程中,完成初始化工作:
在StdAfx.h中加入

#define ULONG_PTR unsigned long
#include <Gdiplus.h>
using namespace Gdiplus;

#include "GdiPlus.h"

3.在CApp標頭檔中加入
ULONG_PTR        m_gdiplusToken;

4.在 BOOL C×App::InitInstance() 中添加

GdiplusStartupInput     m_gdiplusStartupInput;
GdiplusStartup(&m_gdiplusToken, &m_gdiplusStartupInput, NULL);

5.在int CXApp::ExitInstance()加入(這個方法需要自己加入 在ClassWizard 中,注意在ClassName中選擇CXApp,Messages列表框中選擇ExitInstance)

diplusShutdown(m_gdiplusToken);

6.在Project->stting->Link->Object/libary中加入gdiplus.lib
此時GDI+設定成功。

原文地址:http://www.cnblogs.com/DavidHu/articles/1191635.html

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.