Jump to content
  • Advertisement
Sign in to follow this  
shrek2

Resource Editior workaround for Visual C++ Express

This topic is 4076 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi Everyone, What is the best workaround for the lack of a resource editor for Visual C++ express?

Share this post


Link to post
Share on other sites
Advertisement
You have to create .rc files manually as text (or, as others have since pointed out, use a resource editor [smile]).

Right click on the Resource filter in the solution explorer and do Add New Item...

Add a file called whatever.rc.

If you double-click it, VS will moan about no resource editor being present. Instead, you need to right-click it and do Open With...

Select Code Editor (or something like that), then click Make Default. From now on (and for ever after till you change it) you can double click the .rc file to open it in the code editor.

Might have got some of the button or menu names a bit wrong, but you'll figure it out.

There's some information here on the format of .rc files but there's probably better articles available on the internet somewhere.

[Edited by - EasilyConfused on July 27, 2007 3:49:15 AM]

Share this post


Link to post
Share on other sites
can you guys elaborate on how to integrate these resource editors with visual c++ express? do i just create the resource files, and then use "Add Item" in visual c++ express to add them to the project? which files do i need? thanks.

btw, i am using windows vista.

Share this post


Link to post
Share on other sites
The program that Paulius Maruska posted (which looks very useful) spits out a .rc and a .h file.

Add the .rc to your project inside the Resource filter, and add the .h file in the Header Files filter.

Then just include the .h file in any .cpps that need access to the identifiers that the resource file uses.

Share this post


Link to post
Share on other sites
i followed the steps and i don't get any errors, but my icon doesn't show up. does anyone know what's wrong? is visual studio express blocking it internally?

Share this post


Link to post
Share on other sites
Quote:
Original post by shrek2
i followed the steps and i don't get any errors, but my icon doesn't show up. does anyone know what's wrong? is visual studio express blocking it internally?


What do you mean "it doesn't show up"? Where do you expect them to "show up"? And what application did you use to create the icon (ICO file)?

Visual C++ 2005 Express doesn't block anything - I compile my resources without any problems and everything works just fine...

Share this post


Link to post
Share on other sites
I mean I don't see the icon displayed in my window. I am using ResEdit to make

resource.rc
resource.h
icon.ico

Then I go to Visual Studio express and I add resource.rc and resource.h to the project. Next, I add #include "resource.h" to my winmain.cpp file. It's the only cpp file.

Then when i register the class instance (wc), I have this line:

wc.hIcon = LoadIcon(ghAppInst,MAKEINTRESOURCE(IDI_ICON1));

I compile and build. I don't have any errors, but when I run it the icon is not displayed on the window.

Share this post


Link to post
Share on other sites
Does your exe file have an icon other than the standard win32 application icon? If it does, then the resource has been added to the exe successfully, and it's just your code that's at fault.
If not, then the icon hasn't been added to the exe.

What does LoadIcon return? If it returns null then obviously you're not going to get an icon...

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!