Include files for Image class
Hi there,
I've just started to experiment with the GDI+ libary.ยจ
My problem is that I can't make a Image object because I get the following error:
1>c:\documents and settings\elly\dokumenter\programmering\visual c++\custom window\custom window\graphic_functions.h(22): error C2065: 'Image' : undeclared identifier
I have included the following headers:
1 2 3
|
#define _AFXDLL
#include <afxwin.h>
#include <GdiPlus.h>
|
Do I need to add more headers before I can use the class?
Regards,
Simon H.A.
Last edited on
hi,
you need to add
1 2
|
using namespace Gdiplus;
|
you will also need something like this before using it
1 2 3 4 5
|
void setupGdi()
{
CoInitialize(0);
GdiplusStartup(&token,&startup,NULL);
}
|
and for linking you need to include the following libaries
gdiplus.lib
ole32.lib
Hope this helps
Shredded
Thanks Shredded!
That solved my problems.
Regards,
Simon H.A.
Topic archived. No new replies allowed.