huseyin tugrul buyukisik
huseyin tugrul buyukisik

Reputation: 11926

VC++ 10.0 express gdi+ GdiPlusPen.h header

When i include GdiPlus.h,Pen class is undefined.

But GdiPlus.h includes GdiPlusPen.h

...
#include "GdiplusImageAttributes.h"
#include "GdiplusMatrix.h"
#include "GdiplusBrush.h"
#include "GdiplusPen.h" 
#include "GdiplusStringFormat.h"
#include "GdiplusPath.h"
...

When i include GdiPlusPen.h myself, it works. Can i use it safely?

Question: is this because of my VC++ being express install?

8 days left until activation prompt :( Anyone having same problem?

Windows XP sp-3, pentium-m centrino.

Upvotes: 0

Views: 203

Answers (1)

Hans Passant
Hans Passant

Reputation: 942178

No, #including GdiplusPen.h directly isn't correct. The gdiplus classes live in a namespace named "Gdiplus". Either use that namespace explicitly (like Gdiplus::Pen) or make it look like this in your .cpp file:

#include <gdiplus.h>
using namespace Gdiplus;

Upvotes: 1

Related Questions