Resource files may consist of comments, C++ pre-processor statements, and structure statements indicated by predefined keywords.
For more information on the format of resource files, see Resource file source format .
For a commented example of a resource file, see Resource management example: HelloWorldBasic .
A resource file has the following structure:
You can use either C ( /* */ ) or C++ ( // ) style comments.
For more information on the lexical conventions of resource files, see Lexical conventions .
The first non-comment statement in a resource must be the NAME statement. The syntax is as follows:
where name is a 4 letter ID that is unique in the application. This ID is used to differentiate and access resource files when an application uses multiple resource files.
For more information on the NAME statement, see NAME statement .
The resource compiler supports a set of pre-processor statements, including:
For more information on the supported pre-processor statements, see C++ pre-processor statements .
Typically, resource files contain #includes statements for the following files:
These files are located under the /Epoc32/include folder. They contain the structure declarations for commonly used data structures in the Symbian platform.
The RESOURCE keyword is used to declare a resource in a resource file. The syntax is as follows:
<STRUCT_NAME> is the name of a declared data structure in an included resource header file.
<STRUCT_NAME> must be in upper case.
resource_name identifies the resource .
resource_name must be in lower case.
resource-initialiser-list contains the values the members of the structure should be initialized with when the default values should not be used.
RESOURCE statements may include resources defined within other resource statements in the resource file. For example:
uses a resource declared in a later statement to define its menu bar. For more information, see EIK_APP_INFO .
Resource statements may also included nested resource structures. For example:
For more information on the MENU_PANE resource see , Menu bar resource statements .
For more information on structures, see:
For more on resource statements, see:
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License v1.0.