Home > Software engineering >  MFC Bitmap and Color in the program for undefined identifiers
MFC Bitmap and Color in the program for undefined identifiers

Time:10-01



I saw a gdipluscolor external dependencies inside. H and gdiplusheader. H (hope not misspelled) there is the definition of these two classes, I want to know how to change to correct mistakes, give advice or comments please the great god!

CodePudding user response:

# include the header file, and then in the lib reference additional dependencies

CodePudding user response:

Contains header files, Bitmap and Color not MFC internal type definition

CodePudding user response:

If you want a little convenient, install a VAX, then right click & gt; Refactor - & gt; Add the include
V + VAX, convenient to develop a lot

CodePudding user response:

Bitmap and Color it is something in Gdi +.
Use Gdi +, probably need to step

1. Import libraries include the header file, use the namespace
# include & lt; GdiPlus. H>
Using the namespace Gdiplus;
# pragma comment (lib, "gdiplus. Lib")
2. Startup and shutdown function of GDI +
Define variables:
ULONG_PTR gdiplusToken;//it is best to global, because when closed would use the
The GdiplusStartupInput gdiiput;//local variables, behind no.
Start the function called
GdiplusStartup (& amp; GdiplusToken, & amp; Gdiiput, NULL);
Close the function called
GdiplusShutdown (gdiplusToken);
  • Related