Author Topic: Importing bmp's - resource files  (Read 9481 times)

Offline Xorlium

  • Multiple posting newcomer
  • *
  • Posts: 21
    • http://
Importing bmp's - resource files
« on: June 05, 2005, 09:20:54 pm »
Hi... this may be a dumb question, but I just can't do it...

How do I import bmp's into a project for the resource compiler or something??

I can load files from within the program, but I don't know how to make the bitmaps part of the .exe :)

Thanks!

Offline Urxae

  • Regular
  • ***
  • Posts: 376
Importing bmp's - resource files
« Reply #1 on: June 05, 2005, 09:40:55 pm »
Looking at the Code::Blocks source, I see a file named resources.rc with lines like this:
Code
wxBITMAP_STD_COLOURS    BITMAP "wx/msw/colours.bmp"

As I understand it, the first word is a name, the second is the type of resource (a bitmap file in this case, but ICON is also mentioned in the file) and the third is a filename (the resource data, I presume).
This bitmap is added to the project and set to compile and link into the main executable.

Now please don't ask me how to load that bitmap from the program, as I have no idea. I never needed to use that stuff :)
I'll let someone else answer that one.

Offline Xorlium

  • Multiple posting newcomer
  • *
  • Posts: 21
    • http://
Importing bmp's - resource files
« Reply #2 on: June 16, 2005, 02:58:54 am »
Thanks a lot! It worked perfectly. Just like that, make a "myapp.rc" file, and put in lines like:

MyPic BITMAP "pics/mine.bmp"

And that's it :)