To define resources for your own CBA buttons:
Determine the CBA button requirements of your application.
Declare cba
= r_name21
in the EIK_APP_INFO
or AVKON_VIEW
statements,
where r_name21
is a unique identifier in the application.
Create a RESOURCE
statement
for the CBA buttons. For the declaration in step 2, the syntax is as follows:
RESOURCE CBA r_name21 { flags = enumerated value in eikon.hrh; buttons = { CBA_BUTTON { id = enumerated command either from S60 platform or from application; txt = STRING_button_name1; bmpfile = file name; bmpid = ID of bitmap in file; bmpmask = ID of bitmap mask in file; }, }; }
where:
flags
indicates how the button group
should be handled by the S60 platform. The default value is EEikButtonGroupAddToStack
,
which indicates the button group should be added to the stack.
For more information on the stack, see Event handling
While the value used here is determined by the requirements of your application, typically the default value is valid for most applications.
buttons
is the name of an array that
holds the individual buttons that the group is composed of. The array can
contain the CBA_BUTTON
structures.
The CBA_BUTTON
structure has the following syntax:
id
is an enumerated value for the command
that is associated with the button. The value used can be provided either
by the underlying S60
platform or by your
application.
For more information on command handling, see Event handling.
txt
is a string that defines the name
of the button present
bmpfile
, bmpid
,
and bmpmask
are used for defining an icon for the button.