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.
-
- 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.
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 ")
-
Add using namespace gdiplus to the module that requires the GDI + function;
-
Initialize the GDI + environment.
The above environment is compiled in vc6 wtl 7.1