RoxxSoft Development Blog
Posts tagged dialog editor
Simple Win32 application with source code
Oct 2nd
My last post generated some mail about how to use a .rc file from inside Visual C++ 2008 Express, so i decided to post this little example of an application made using resedit, basically what is contained here is a .rc file, a cpp file that uses it, and a resource.h file which contains some definitions.
I’ve used resedit because at least for me, it is as good as any Microsoft application, and it is free, fast, small and i like to work with it, of course you can choose whatever suits you best, but resedit is the best for me. :), if you don’t know where to find this app, please have a look at my post about resource editors, where you can find links to the most popular ones.
To recreate a project like this one, first you need to create an empty project in Visual C++, then, just add an empty .cpp file, then, in resedit, generate at least one dialog, with all the controls you need, save the .rc file into the same folder where your Visual C++ project is, then import the file into the editor by right clicking over the Resource Files section in the Solution Explorer, then select your .rc file.

If you generate the c++ code from inside resedit, only import the resource.h file, forget about the generated .cpp file, after including those files, all you have to do is write the windows procedure and the windows main function and that’s it, the zip file i have linked here has a very simple win32 application that does all these things, if you are interested to know how to build a simple application without too much effort have a look at the code sample, i was going to write a little tutorial about win32, but, the app is so simple that i believe it is better to just explore the code and use the msdn docs to learn about how it works.
After importing the .rc file into Visual C++, you can still change it from resedit, everytime you save your changes, the Visual C++ editor will notify you and allow you to reload the .rc file, this makes it very easy to keep working with both tools open and without locked file conflicts.
Click here to download the code: win32App.zip
Hope this is useful to you, if any doubt comes along, you are free to ask :), i will try to help but please remember it may take some time to see your questions since i don’t check the blog everyday.
Depending on the free time i have, i am considering writing some tutorials about win32, but i think there are some good ones already on the web. anyway, maybe if enough people are interested i’ll do it.
Visual resource editor for Visual C++ Express
Sep 26th
As mentioned in a previous post, after installing the Express edition of Visual C++ 2008, i found out it didn’t had a visual resource editor, while the c# express compiler does include one, so i started to look for an alternative and after looking at various commercial apps i found some free ones:
Very cool resource editor, free, not open source though:
ResEdit
This one includes the complete IDE, it is open source and seems to work with several compilers:
http://www.ultimatepp.org/
Here is another one, seems ok, not tested:
http://www.wilsonc.demon.co.uk/d10resourceeditor.htm
And of course there are a couple commercial ones, i found this one to be good:
http://www.resource-builder.com/download.html
But i did not use it so much to have a real world opinion so…
While the Visual c++ 2008 express edition seems to be targeted to students or beginners, i found that very hard to believe, without the resource editor, how are they supposed to get up to speed?, by programming like 25 years ago? I guess it is in microsoft’s best interest to move everyone into using c# as soon as possible.

Recent Comments