Skip to main content
gamedev.net
🔒 Locked

GDI+ Bitmap class problem

Started by hacer 2 replies 1k views
Original Post
hacer
hacer
I've got a strange problem. I want to load bmp file using Bitmap class from GDI+. But it's not working.

Bitmap * bmp = new Bitmap("Bitmap.bmp");
in this line I have 3 errors error C2061: syntax error : identifier 'Bitmap' error C2065: 'Bitmap' : undeclared identifier error C2065: 'bmp' : undeclared identifier I have included gdiplus.h and gdiplus.lib. What is required for using Bitmap class??
xissburg
xissburg
it seems you didnot #include GdiPlusBitmap.h
.
hacer
hacer
But i've included gdiplus.h and it contains GdiplusBitmap.h
hacer
hacer
I've sloved it :) i forgot one line

using namespace Gdiplus;

now it is ok :)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.