|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer|
Symbols: Resource Identifiers
A symbol is a resource identifier (ID) that consists of two parts: a text string (symbol name) mapped to an integer value (symbol value). For example:
IDC_EDITNAME = 5100
Symbol names are most often referred to as identifiers.
Symbols provide a descriptive way of referring to resources and user-interface objects, both in your source code and while you're working with them in the resource editors. You can view and manipulate symbols in one convenient place using the Resource Symbols dialog box.
When you create a new resource or resource object, the resource editors provide a default name for the resource, for example,
IDC_RADIO1, and assign a value to it. The name-plus-value definition is stored in the Resource.h file.
Note When you are copying resources or resource objects from one .rc file to another, Visual C++ may change the transferred resource's symbol value, or symbol name and value, to avoid conflicts with symbol names or values in the existing file.
As your application grows in size and sophistication, so does its number of resources and symbols. Tracking large numbers of symbols scattered throughout several files can be difficult. The Resource Symbols dialog box simplifies symbol management by offering a central tool through which you can:
- View Resource Symbols
- Create New Symbols
- Change Unassigned Symbols
- Delete Unassigned Symbols
- Open the Resource Editor for a Given Symbol
- Change a Symbol or Symbol Name (ID)
- Change a Symbol's Numeric Value
- Change the Names of Symbol Header Files
- Include Shared (Read-Only) or Calculated Symbols
- View Predefined Symbol IDs
For information on adding resources to managed projects, please see Resources in Applications in the .NET Framework Developer's Guide. For information on manually adding resource files to managed projects, accessing resources, displaying static resources, and assigning resources strings to properties, see Walkthrough: Localizing Windows Forms and Walkthrough: Localizing Web Forms.