Is it possible to write dialog boxes 'on the fly'

Sep 6, 2010 at 8:52pm
Can I create a dialog box without a resource file? I am using VC++ Express so I can't edit resource files.
Sep 6, 2010 at 9:05pm
You can write the resource files by hand (it's not that hard) and compile them with rc.exe. Or you can create them dynamically, but you'd have to search MSDN because each resource requires different functions and structures.
Sep 6, 2010 at 9:59pm
Where can I download rc.exe. I searched some but can not find it. Dev-Cpp compiled one of my resource file, but it won't compile the one I have for dialog boxes. Here is the code (I am following a tutorial www.winprog.org)
1
2
3
4
5
6
7
8
9
10
11
IDD_ABOUT DIALOG DISCARDABLE  0, 0, 239, 66
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "My About Box"
FONT 8, "MS Sans Serif"
BEGIN
    DEFPUSHBUTTON   "&OK",IDOK,174,18,50,14
    PUSHBUTTON      "&Cancel",IDCANCEL,174,35,50,14
    GROUPBOX        "About this program...",IDC_STATIC,7,7,225,52
    CTEXT           "An example program showing how to use Dialog Boxes\r\n\r\nby theForger",
                    IDC_STATIC,16,18,144,33
END
Sep 7, 2010 at 2:43am
You'll find everything you need here...

http://www.daniweb.com/forums/thread245377.html

In your \bin folder of the Dev-C++ installation is windres.exe. That can be used also at the command line to convert *.rc files to *.obj files (I think. I'd have to double check on that ).
Last edited on Sep 7, 2010 at 2:50am
Sep 7, 2010 at 5:26am
Dev-C++ is outdated. If you have VC++ Express installed, you have rc.exe. You can access it through VC++ Express' command prompt. You need to compile .rc files into .res files, then add them to your project.
Last edited on Sep 7, 2010 at 5:31am
Sep 8, 2010 at 1:32am
How to find and use rc.exe?
Last edited on Sep 8, 2010 at 1:34am
Sep 8, 2010 at 3:27am
As I said, it can be found through VC++ Express' command prompt. In VC++ Express 2010, it's under Tools, Visual Studio Command Prompt. Just type rc /? to get the command line options.
Sep 8, 2010 at 3:46am
filipe is pretty much right about Dev-C++. It worked OK if you managed to get a good installation. But sometimes it just won't work right. If I were you I'd go with either VC Express or CodeBlocks. I actually prefer CodeBlocks.

If you spent some time following my link above though, you would figure out your problems.

On any Microsoft C++ installation you'll find rc.exe in the \bin directory of the C/C++ installation. If you open a command prompt window and type rc /? you'll get help on it.
Topic archived. No new replies allowed.