Using the Resource Compiler

The Resource Compiler is called automatically whenever you build a program that has a resource script file in its project.

The Resource Compiler serves the following functions:

It compiles the resource script file and the resource files (such as icon and cursor files) into a binary resource (.RES) file.

It combines the compiled .RES file with the executable (.EXE) file created by the linker; the result is an executable Windows application.

It marks all Windows applications (even if they have no resources) with a Windows version stamp.

NOTE:

All Windows applications and libraries must bear a Windows version stamp. For this reason, use RC on every Windows application and library you build, whether or not it uses any resources.

You control the resource compiler from the Customize Resource Options dialog box (Figure 7.2).

·To open this dialog box:

1.Choose the Project command on the Options menu.

2.From the Project dialog box, choose the Resources button. The Customize Resource Options dialog box appears (Figure 7.2).

By default, the resource compiler compiles an .RC file and adds the resulting .RES file to the executable file. However, you can specify options that let you use the resource compiler in other ways:

To compile resources separately (without linking them to the executable file)

To compile a dynamic-link library (DLL) that does not have a .RES file (the DLL filename must explicitly have an .EXE, .DRV, or .DLL extension)

To add a previously compiled resource (.RES) file to an executable file