Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Changing softkeys dynamically and disabling them in Symbian

From Wiki
Jump to: navigation, search
Article Metadata
Platform(s): S60 1st Edition
S60 2nd Edition
S60 3rd Edition
S60 3rd Edition (initial release)
S60 2nd Edition (initial release)
S60 1st Edition
Created: User:Technical writer 2 (17 Aug 2007)
Last edited: hamishwillee (14 Jun 2012)


This article shows how to change and disable softkeys dynamically in Symbian C++.


Softkeys can be changed dynamically in the following way:

Define a new CBA resource (or resources) in the .rss file

 RESOURCE CBA r_custom_cba1
buttons =
CBA_BUTTON { id = ECba1Button1; txt = "Button1"; },
CBA_BUTTON { id = ECba1Button2; txt = "Button2"; }

Add definitions for new command IDs to the .hrh file:

    enum TMyMenuCmdIDs

And call SetCommandSetL() from the code:

Headers required:

#include <eikbtgpc.h>   // CEikButtonGroupContainer

Library required:

LIBRARY avkon.lib eikcoctl.lib   //CEikButtonGroupContainer

Source file:

CEikButtonGroupContainer* cba = CEikButtonGroupContainer::Current();

See also predefined resources in avkon.rsg. For example, to change CBA buttons to Options/Cancel:


To disable softkeys, use the predefined resource R_AVKON_SOFTKEYS_EMPTY.

This page was last modified on 14 June 2012, at 04:45.
60 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.