GDI + is a sub-system in Windows XP. It is mainly responsible for outputting information on the display screen and the printing device. It is a set of application programming interfaces implemented through C ++ class. As the name suggests, GDI + is the successor of the previous version of GDI. For compatibility considerations, Windows XP still supports the previous version of GDI, but when developing new applications, developers should use GDI + to meet the graphics output needs, because GDI + has optimized the GDI in previous Windows versions and added many new features.
Unfortunately, vc6.0 does not allow you to use GDI + directly. The following describes a convenient method for using GDI + in vc6.0. The procedure is as follows:
1.copy the files in the uplodes and Lib files to the uplodes and Lib folders in the VC directory;
GDI + for vc6.0 SDK:
Http://www.codeguru.com/code/legacy/gdi/GDIPlus.zip
2. Complete the initialization in the project where you are going to use GDI +:
Add the following code to the stdafx. h header file:
// Added header file
# Include <comdef. h> // initialize the comport.
# Ifndef ulong_ptr
# Define ulong_ptr unsigned long *
# Include "gdiplus. H"
Using namespace gdiplus;
# Endif
// End
3. Add the xxxdlg. h header file to the public file.
Ulong_ptr m_pgditoken;
4. Add in program Initialization
// Two variables used by GDI +
Gdiplusstartupinput m_gdiplusstartupinput;
// M_pgditoken;
// Load GDI +
Gdiplusstartup (& m_pgditoken, & m_gdiplusstartupinput, null );
5. Add it before exiting the program
// Uninstall GDI +
Gdiplusshutdown (m_pgditoken );
6. Add gdiplus. lib to project> stting> link> Object/libary.
In this way, you can use GDI + for your project. There is no technical content!