Cxiamge uses static library vs2010

Source: Internet
Author: User

First download cxiamge. I am using cxiamge_702.

: Http://download.csdn.net/detail/xing_ping_1987/8085129

Compile static library

Create a project. The specific configuration in vs2010 is as follows:

1. Configure-> General-> Use of MFC, and select "use MFC in static library ".

Configure the general character set and select multi-byte character set ".

2. Project -- properties -- configuration properties -- General, select "use MFC in static library" and use "Multi-Byte Character Set ".

3. "C/C ++" -- "General --" attaches the include directory and fills in the above include folder location.

4. "connector" -- "general" -- "additional library directory, fill in the above lib folder location.

 

End.

Compile the project. Write a piece of code and try it. In the View class, write include <ximage. h> to the ondraw () function:

HDC;
HDC = PDC-> m_hdc;
Cstring filename ("E: \ 11.jpg ");
Cximage cimage;
Cimage. Load (filename, cximage_format_jpg );
Cimage. Draw (HDC, 0, 0 );

Compile and run it. You can see the image and it will be OK.

Cxiamge uses static library vs2010

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.