Visual c ++ 6.0 supports GDI +

Source: Internet
Author: User

As the classic version of C ++, vc6 is still providing convenience for you, but it is too old. The original version does not support GDI + programming. The settings are as follows.

 

  1. Download the SDK that supports vc6

    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
    Choose one of the above two to decompress and install them, and set the directory in VC. Both of the above are built-in GDI + programming libraries. I chose for XP SP2.

  2. Add # include <gdiplus. h> to stdafx. H. Note that the back position is added; otherwise, an error occurs during compilation.
    Add # 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> // The main file must be added to the back-to-back position. Otherwise, an error occurs during compilation. # pragma comment (Lib, "gdiplus. lib ")

  3. Add using namespace gdiplus to the module that requires the GDI + function;

  4. Initialize the GDI + environment.

The above environment is compiled in vc6 wtl 7.1

Related Article

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.