To define resources for a precompiled CBA button option:
Determine the CBA button requirements of your application.
Declare cba
= precompiled symbolic ID in avkon.hrh
in the EIK_APP_INFO
or AVKON_VIEW
resource.
where precompiled symbolic ID in avkon.hrh
is an enumerated value in
the avkon.hrh
file delivered with the SDK and in the ./Epoc32/include
folder.
An example is as follows:
RESOURCE EIK_APP_INFO { menubar = r_value_menubar; cba = R_AVKON_SOFTKEYS_OPTIONS_EXIT; }
In this case, Options
and Exit
appear
above the softkeys at runtime.
The Options
softkey is bound to a command that
results in the application framework opening the options menu based on the MENU_BAR
resource.
The Exit
softkey returns the EAknSoftkeyExit
command,
which would need to be handled in the appropriate place for command handling
in your application architecture. Note that the S60 platform enumerations
are in the avkon.hrh
file. In general, you can map the
commands returned from the CBA options by comparing the names of the symbolic
IDs to the symbolic names in the enumerated list.
If required, handle the commands caused by the selection of a CBA option in your application.