4 Replies - 1414 Views - Last Post: 31 July 2010 - 02:05 PM Rate Topic: -----

#1 temporaryavailable  Icon User is offline

  • New D.I.C Head

Reputation: -1
  • View blog
  • Posts: 12
  • Joined: 29-July 10

'Bitmap' was not declared in this scope

Posted 29 July 2010 - 02:04 AM

Hello,
anyone know what is the header for Bitmap?
When i try compile

Bitmap myBitmap;


i get the error: 'Bitmap' was not declared in this scope.

Im using Code::Blocks and WinXP sp3.
Is This A Good Question/Topic? 0
  • +

Replies To: 'Bitmap' was not declared in this scope

#2 Aphex19  Icon User is offline

  • Born again Pastafarian.
  • member icon

Reputation: 615
  • View blog
  • Posts: 1,873
  • Joined: 02-August 09

Re: 'Bitmap' was not declared in this scope

Posted 29 July 2010 - 02:29 AM

I don't know of any Bitmap class in C++. What leads you to believe there should be?
Was This Post Helpful? 0
  • +
  • -

#3 temporaryavailable  Icon User is offline

  • New D.I.C Head

Reputation: -1
  • View blog
  • Posts: 12
  • Joined: 29-July 10

Re: 'Bitmap' was not declared in this scope

Posted 29 July 2010 - 02:51 AM

View PostAphex19, on 29 July 2010 - 01:29 AM, said:

I don't know of any Bitmap class in C++. What leads you to believe there should be?

You are just right about that!
This is the code im using:
Bitmap myBitmap;
myBitmap = myBitmap::FromHBITMAP(hBitmap,NULL)

Would you tell me how to write it in C++?
Was This Post Helpful? 0
  • +
  • -

#4 temporaryavailable  Icon User is offline

  • New D.I.C Head

Reputation: -1
  • View blog
  • Posts: 12
  • Joined: 29-July 10

Re: 'Bitmap' was not declared in this scope

Posted 29 July 2010 - 03:16 AM

I just found out it is C++, but an external "image library". I am a newbie so this is all new to me.
Would you suggest an "image library" for me to use, so that i can get the rgb values from HBITMAP and also save the whole image in HBITMAP to a .bmp file?
Thanks

This post has been edited by temporaryavailable: 29 July 2010 - 03:16 AM

Was This Post Helpful? 0
  • +
  • -

#5 temporaryavailable  Icon User is offline

  • New D.I.C Head

Reputation: -1
  • View blog
  • Posts: 12
  • Joined: 29-July 10

Re: 'Bitmap' was not declared in this scope

Posted 31 July 2010 - 02:05 PM

All right i found a very good answer for this and here is the quote:

Quote

Bitmap is a class defined in GDI+ Library.
To use it, you have to do the following:

  • include <ghiplus.h> header;
  • link your project to gdiplus.lib;
  • initialize GDI+ library by a call to GdiplusStartup;
  • use Gdiplus namespace anytime you are using GDI+ stuff;
  • read GDI+ documentation and examples (see the links below).


More info you can find in:

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1