Share via


Working with Resource Files

OverviewHow Do I

You can work with resources that were not developed in Visual C++'s development environment or are not part of your current project. For example, you can:

  • Work with nested and conditionally included resource files.

  • Update existing resources or convert them to Visual C++ format.

  • Import or export graphic resources to or from your current resource file.

  • Include shared or read-only identifiers (symbols) that can’t be modified by the development environment.

  • Include resources in your executable (.exe) file that don’t require editing (or that you don’t want to be edited) during your current project, such as resources that are shared between several projects.

  • Include resource types not supported by the development environment.

You can open the types of files shown in the following table and edit the resources they contain.

Filename Description
.rc 16- and 32-bit resource script files
.res 16- and 32-bit resource files
.exe 16- and 32-bit executable files
.dll 16- and 32-bit dynamic link library files
.bmp, .dib, .ico, and .cur Bitmap, icon, and cursor files

You can save your resources as shown in the following table.

Open file as Save file as
.rc .rc or 32-bit .res
16-bit .res .rc or 16-bit .res
32-bit .res .rc or 32-bit .res
16-bit .exe 16-bit .exe, .rc, or 16-bit .res
32-bit .exe 32-bit .exe, .rc, or 32-bit .res
16-bit .dll 16-bit .dll, .rc, or 16-bit .res
32-bit .dll 32-bit .dll, .rc, or 32-bit .res
.bmp or .dib .bmp or .dib
.ico .ico
.cur .cur

Note   Resource script files (.rc) are distinguished as being 16- or 32-bit by whether they contain 32-bit resource keywords (such as LANGUAGE, EXSTYLE, or DIALOGEX), not by their underlying file structure. You create a 32-bit .rc file only by adding 32-bit keywords to it.

The environment also works with the files shown in the following table during your resource editing session.

Filename Description
Resource.h Header file generated by the development environment; contains symbol definitions.
filename.aps Binary version of the current resource script file; used for quick loading.
projectname.clw File containing information about the current project; used by ClassWizard in Visual C++.
projectname.mak File containing project build instructions.
projectname.vcp Project configuration file.

What do you want to do?