diff -r 43e37759235e -r 51a74ef9ed63 Symbian3/SDK/Source/GUID-5B26AB8E-E20A-4C15-B4F8-812ED9A4A96C.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/SDK/Source/GUID-5B26AB8E-E20A-4C15-B4F8-812ED9A4A96C.dita Wed Mar 31 11:11:55 2010 +0100 @@ -0,0 +1,75 @@ + + + + + +Defining +resources for your own CBA buttons +

To define resources for +your own CBA buttons:

+
    +
  1. Determine +the CBA button requirements of your application.

  2. +
  3. Declare cba += r_name21 in the EIK_APP_INFO or AVKON_VIEW statements, +where r_name21 is a unique identifier in the application.

    +
  4. +
  5. 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 Symbian 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 Symbian 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 Symbian +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.

      +
    • +
    +
  6. +
+
\ No newline at end of file