Documentation Center

Bitmaps, Icons, and Cursors

To import bitmaps, icons, cursors, and other binary resources from the RC file, you will have to set the appropriate options for the source file. See The Source File Options Dialog.

The source file options dialogThe RC file parser will import binary resources if it can find the corresponding file. If files are specified using a relative path, the RCParser searches for them relative to the RC file. In this example, the parser searches for the files c:\AllBitmaps\Splash.bmp and d:\MyProject\res\toolbar.bmp. If these files are found they will be imported into the string list.

// Source: d:\MyProject\MyProject.rc

IDR_SPLASH   BITMAP  DISCARDABLE     "c:\\AllBitmaps\\Splash.bmp"

IDR_TOOLBAR  BITMAP  DISCARDABLE     "res\\toolbar.bmp"

Generating the Target File

If the translator changes a binary resource, the resource is written to a subfolder subordinate to the RC file.

If the target file is located in the same folder as the source file, an additional subfolder res- is created.

// Target (German): d:\MyProject\MyProject.rc

IDR_SPLASH   BITMAP  DISCARDABLE     "res-deu\\Splash.bmp"

IDR_TOOLBAR  BITMAP  DISCARDABLE     "res-deu\\toolbar.bmp"
If the target file is located in a different folder, a new subfolder is only created when required.

// Target (German): d:\MyProjectDeu\MyProject.rc

IDR_SPLASH   BITMAP  DISCARDABLE     "res-deu\\Splash.bmp"

IDR_TOOLBAR  BITMAP  DISCARDABLE     "res\\toolbar.bmp"