Author Topic: How to add Windows Resources  (Read 3194 times)

Offline miggl

  • Single posting newcomer
  • *
  • Posts: 6
How to add Windows Resources
« on: December 03, 2005, 04:02:53 am »
Hi all,

I appologize if this question has already been asked before (however, I couldn't find anything that approximates my problem).

I am working through some code tutorials that assume I'm using MS VC++ and their instructions are as follows:

Quote
"Go to the Insert menu and select Resource. From the upcoming dialog, select Dialog, and the select the New button."

It's obvious here to me what they're doing (as I'm used to the VC++ environment myself), but how can I accomplish this in CB? My initial guess is that I have to manually add the resource file in the project tree. I'm stumped at how to do that as well though, since I have no idea where to find these resource files in windows, or even where to download them.

Any help is appreciated :) Thanks guys!

Mike

Offline Vampyre_Dark

  • Regular
  • ***
  • Posts: 255
  • Hello!
    • Somewhere Over The Rainbow...
Re: How to add Windows Resources
« Reply #1 on: December 03, 2005, 03:16:56 pm »
Okay, to add a resrouce, you just 'add new file' and select the resource file you have already made up. To make these resources you will have to either type the rc file by hand, or use an editor.

Here is a good editor.
http://www.radasm.com/projects/ResEd.zip

C::B Wishlist
~BOYCOTT THE EVIL YELLOW BOXES~

Offline miggl

  • Single posting newcomer
  • *
  • Posts: 6
Re: How to add Windows Resources
« Reply #2 on: December 03, 2005, 05:24:03 pm »
Thanks for the info. So, in order to use any MS VC++ resources they describe in tutorials, I will need to install VC++, add the resource there in a dummy project, then open codeblocks and reference that file?

Methinks I'll make add all MS resources in a dummy project and then make a lirbrary for codeblocks for them.

Also, thanks for the link to the resource editor. Can it be integrated into codeblocks (i.e. as a custom tool or something)?

Cheers!
Mike

Offline Vampyre_Dark

  • Regular
  • ***
  • Posts: 255
  • Hello!
    • Somewhere Over The Rainbow...
Re: How to add Windows Resources
« Reply #3 on: December 03, 2005, 06:15:52 pm »
No......

You use the resource editor I provided, and then add the outputted .rc and .h file to your project directly, and include them in your project. VC++ does not enter into the equation at all. If you just installed the MS 2003 toolkit, you will need to download cvtres.exe from MS and add it into your compiler's bin folder to get it to compile the resources into your app.

You can add ResEd as a custom tool. That's what the 'Tools' menu at the top is for. Just add the proper command line.
C::B Wishlist
~BOYCOTT THE EVIL YELLOW BOXES~

Offline miggl

  • Single posting newcomer
  • *
  • Posts: 6
Re: How to add Windows Resources
« Reply #4 on: December 03, 2005, 06:18:55 pm »
Ah, I see what you mean now! ResEd already comes with resource templates, so I don't need to install VC++ to get them from there. Very nice. Thanks again for your guidance!