Resources | developer.brewmp.com Resources | developer.brewmp.com

Developer

resources

Strings

When the resource type is a string, the value of the source attribute shown in the Resource Editor can be either "Text" or "File". This topic shows Resource Editor and CIF examples of each type.

Source attribute is Text

The following Resource Editor screen shows a text string with a value of "data is here":

The following CIF example shows the ModRsc primitive for the text string resource. The values of the id and data fields are taken from the attributes shown in the Resource Editor.

The id value, IDS_STRING_1001, is resolved to the numeric ID in myapp_res.h.

include "myapp_res.h"  -- Defines all the IDS_XXX.
ModRsc {
   id    = IDS_STRING_1001,  -- ID
   type  = RESTYPE_ENCSTRING,    -- String type
   data =  EncStringRscData(AEE_ENC_UNICODE, "data is here"), 
}

Source attribute is File

The following Resource Editor screen shows a file string with a value of "c:\TEMP\data.txt":

The following CIF example shows the ModRsc primitive for the file string resource. The values of the id, type, and data fields are taken from the attributes shown in the Resource Editor.

The id value, IDS_STRING_1001, is resolved to the numeric ID in myapp_res.h.

include "myapp_res.h" -- defines all the IDS_XXX
ModRsc {
   id    =  IDS_STRING_1001,  -- ID
   type  = RESTYPE_ENCSTRING,     -- String type
   data  = EncStringRscData(AEE_ENC_UNICODE, BytesOfFile("c:/TEMP/data.txt")),  
}