Search code examples
winapivisual-studio-2008win32gui

How can I manually add a resource to a Win32 resource file


Visual Studio Win32 projects have a resource file. One can add and configure controls using a GUI interface. However I have a need to enter about 80 check boxes which is very tedious using the GUI. I can open the resource file in a text editor, but if I try and add a new control, Visual Studio cannot understand it. I used to be able to do that in the old WATCOM C++ IDE/compiler.

Clearly VS is doing something else that just making the resource file.

Is there any way to create and add resources (lie controls) by manually editing the rc file?


Solution

    1. Write the .rc file.
    2. Use the resource compiler, rc.exe to compile the .rc file to a compiled resource, .res.
    3. Pass the compiled resource to the linker.