Visual C++ 6.0 支援gdi+

來源:互聯網
上載者:User

VC6作為經典版本C++仍在給各位提供學習便利,但無奈太老了,原裝版本不支援gdi+編程,設定如下,作為參照

 

  1. 下載最後支援VC6的SDK開發包

    For Server2003    3790.0 RTM:    Size (bytes):    342,000,000    Last Updated:    February 2003
    For XPSP2           2600.2180 RTM:      Size (bytes):    266,000,000    Last Updated:    August 2004
    上面兩個任選一個解壓縮安裝一下,並在VC中設定目錄。上面兩個都內建gdi+編程庫。我選擇的是 for XP SP2

  2. stdafx.h中 加入 #include <gdiplus.h>  ,注意加在靠後位置否則編譯出錯
    再加入 #pragma comment(lib, "gdiplus.lib") 

    #include <atlbase.h>#include <atlapp.h>extern CAppModule _Module;#include <atlwin.h>#include <atlframe.h>#include <atlctrls.h>#include <atldlgs.h>#include <atlctrlw.h>#include <atlcrack.h>#include <atlgdi.h>#include <atlmisc.h>#include <gdiplus.h> //主要這個檔案要要添加在靠後位置,否則編譯出錯#pragma comment(lib, "gdiplus.lib")  

  3. 在需要gdi+函數的模組,加入 using namespace Gdiplus;

  4. 初始化一下gdi+ 環境,就可使用。

以上環境在vc6 WTL 7.1 編譯通過

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.