Use GDI + in Windows mobile6.0

Source: Internet
Author: User

Use GDI + in Windows mobile6.0

1. The ROM of mobile6.0 already contains gdiplus. dll, but the header file and Lib file of GDI + are not found in the vc2005 development environment.

Download libgdiplus_bin.zip-474 K from here

2. decompress the package and copy all the header files in the sdkinclude folder to program files/Windows Mobile 6 SDK/pocketpc/include/armv4i. copy the Lib file to program files/Windows Mobile 6 SDK/pocketpc/lib/armv4i.

3. Add stdafx. h

# Include <gdiplus. h>
# Pragma comment (Lib, "libgdiplus. lib ")
Using namespace gdiplus;

4. File member variable in the app class of the program: ulong_ptr m_gdiplustoken

5. Add the following statement after shinitextracontrols of the initinstance function of the app

Gdiplus: gdiplusstartupinput;
Gdiplus: gdiplusstartup (& m_gdiplustoken, & gdiplusstartupinput, null );

6. Add it to the exitinstance function of the app

Gdiplus: gdiplusshutdown (m_gdiplustoken );

 

In this way, you can use GDI +, but note that many functions are unavailable, for example:

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.