STRINGTABLE Resource

The STRINGTABLE resource-definition statement specifies one or more string resources for an application. String resources are simply null-terminated Unicode strings that can be loaded when needed from the executable file, using the LoadString function.

Syntax

STRINGTABLE  [[optional-statements]]  {      stringID string      . . .  }
 

Parameters

optional-statements
Zero or more of the following statements:
Statement Description
CHARACTERISTICS dword User-defined information about a resource that can be used by tools that read and write resource files.
LANGUAGE language, sublanguage Specifies the language for the resource. The parameters are constants from WINNT.H.
VERSION dword User-defined version number for the resource that can be used by tools that read and write resource files.

stringID
Specifies an unsigned 16-bit integer that identifies the resource.
string
Specifies one or more strings, enclosed in double quotation marks. The string must be no longer than 4097 characters and must occupy a single line in the source file. To add a carriage return to the string, use this character sequence: \012. For example, "Line one\012Line two" would define a string that would be displayed as follows:
Line one
Line two 
 

Remarks

RC allocates 16 strings per section and uses the identifier value to determine which section is to contain the string. Strings whose identifiers differ only in the bottom 4 bits are placed in the same section.

Example

The following example demonstrates the use of the STRINGTABLE statement:

#define IDS_HELLO    1
#define IDS_GOODBYE  2

STRINGTABLE
{
    IDS_HELLO,   "Hello"
    IDS_GOODBYE, "Goodbye"
} 
 

See Also

LoadString, ACCELERATORS, CHARACTERISTICS, DIALOG, LANGUAGE, MENU, RCDATA, VERSION