Windows Mobile6.0下使用GDI+

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
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值