Windows Mobile6.0下使用GDI+

來源:互聯網
上載者:User

Windows Mobile6.0下使用GDI+

一、Mobile6.0的ROM中已含有gdiplus.dll,但VC2005開發環境中沒有GDI+的標頭檔和lib檔案

從這裡下載 LibGdiplus_Bin.zip - 474K

二、解壓後把SDKInclude檔案夾中的所有標頭檔拷貝到Program Files/Windows Mobile 6 SDK/PocketPC/Include/Armv4i中, 把WINCE6檔案夾中的LibGDIPlus.lib檔案拷貝到Program Files/Windows Mobile 6 SDK/PocketPC/Lib/Armv4i中。

三、在stdafx.h中加入

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

四、在程式的App類裡標頭檔中成員變數: ULONG_PTR m_gdiplusToken

五、在App的InitInstance函數的SHInitExtraControls後添加以下語句

         Gdiplus::GdiplusStartupInput gdiplusStartupInput;
         Gdiplus::GdiplusStartup(&m_gdiplusToken, &gdiplusStartupInput, NULL);

六、在App的ExitInstance函數中加入

        Gdiplus::GdiplusShutdown(m_gdiplusToken);

 

      這樣就可以使用GDI+了.但注意有很多函數不能用,例如:

No support to load image file directly from path
Use IStream interface to load file data, use the stream interface version to create bitmap. Same goes for resource.
Windows Mobile doesn't support the following features:
GDI Path (GDI path functions are not exported)
Enhanced Meta file

聯繫我們

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