Step 3: Resource ID reference options  Previous topicNext topicFirst topicLast topic



Step 3: Processing Options <--Back Next-->



Resource strings are identified by a 16 bit unsigned integer for a maximum of 65,536 strings. But since Visual Basic only supports signed integers, only 32,767 strings are permitted. A string is retrieved from the .RES file using the LoadResString(115) function, where 115 is the integer resource ID for string number 115. (This assumes string 115 exists in the .RES file.)

It is often convenient to assign string ID numbers to descriptive constants that provide some insight into what the actual string might say. The dialog below demonstrates the truncated label for the string "This String Belongs In The Res File.". When constant ID labeling is selected, a .BAS file will be created for all the resource ID constant assignments. Here the constant S101_This_String_Belong was generated to represent string resource ID number 101.

ResMe also creates an .RC resource script version of the .RES file. RC files are useful for other development environments, they can be spell-checked by a word processor, and they are a handy way for translators to adapt to other languages. ResMe generates two versions of RC files: an alpha RC file with strings listed in alphabetical order and an RC file with strings grouped according to the file they were found and the order they were found in the file. Both RC files will compile to yield the same resource file.




Other processing options include conversion of Const string assignments, the conversion of "" null string into the built-in vbNullString to reduce the size of your program, and the option of including the full string as a comment in the .BAS file of constants.

After clicking "C
ontinue", the source code in the project will be pre-processed to identify which strings should be placed in the .RES file.

Click Next to continue the tutorial.
<--Back Next-->