Microsoft provides several “Visual Studio Express” tools for free download. These are slightly limited versions of their popular development tools for C++, C#, and Visual Basic.
I enjoy having these tools for free, and most of the missing features I don’t notice. Except for one: resource editing. If you want to add icons or menus to your C++ programs, you’ll have to manually munge up an RC file. Or do you?
I went looking for an open source resource editor. Of course, I could just break down and install my real copies of Visual C++ or even break out some other commercial resource editors I have, but I wanted a free solution to go along with the free Visual Studio Express product.
I looked pretty hard and I couldn’t find a single tool that did what I wanted. However, I did find two tools that together would do the job.
The first tool is the excellent
. What doesn’t this tool do? It will create menus, icons, dialogs, cursors, and everything else you can think of. Oh yeah, but while it will read RC files, I couldn’t find any way to make it save an RC file! It will, however, do a nice job saving to a binary res file.
Of course, you could just leave it at that and let Visual Studio include the .res file. So I guess you can just use one tool. But I wanted an RC file that I could easily manipulate — at least for strings and IDs.
That’s when I downloaded . This tool is made to load resources from just about anywhere. You can do certain things with those resources (although you can’t actually edit them). However, this tool will save a proper RC file.
So the steps are:
1. Use XN Resource Editor to create your resources
2. Save resources as a .RES file
3. Open the .RES file with Resource Hacker
4. Save as a .RC file
5. Add the RC file to your Visual Studio project.
You may have to touch up your RC file a little if you get any errors (for example, include winuser.h).
XN can read an RC file, so you can “round trip” by reading the file from step 4 into XN, making changes, and then repeating steps 2 through 4.