×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    31

    Changing CBA buttons dynamically

    Hi,

    Has anyone been able to change buttons (CBA) dynamically.

    I am trying to do this by using the method:
    CEikCommandButton* CEikButtonGroupContainer::ButtonById(TInt aCommandId)

    It seems that this method is not implemented in Symbianv6.1, Series 60.

    Has anyone been able to use it?

    Nicolas

  2. #2
    Regular Contributor
    Join Date
    May 2003
    Location
    Nice, France
    Posts
    123
    In your AppUi:

    Cba()->SetCommandSetL(R_AVKON_SOFTKEYS_EXIT);
    Cba()->DrawNow();

    This will set your CBA to use the R_AVKON_SOFTKEYS_EXIT resource declaration. Of course you can use your own CBA resources there!

    Daniel

  3. #3
    Registered User
    Join Date
    Jan 2004
    Posts
    23
    Are these two line code only fit for Series 60 platform dev.?

    Cba()->SetCommandSetL(R_AVKON_SOFTKEYS_EXIT);
    Cba()->DrawNow();

    How about changing CBA dynamically in Nokia 9210 by using Nokia 9200 series SDK 1.2?

    by the way,
    R_AVKON_SOFTKEYS_EXIT
    where comes this, since in .rss of Nokia 9200 series SDK1.2, it should be
    R_UIKON_SOFTKEYS_EXIT???

  4. #4
    Registered User
    Join Date
    Jan 2004
    Posts
    23
    Hi,

    I have been strucggling with the problem with changing CBA dynamically a long time. I am working on Nokia 9200 Series SDK 1.2. As mentioned above, I have tried to use the code
    CEikButtonGroupContainer * pCbaGroup = CEikButtonGroupContainer::Current();
    in HandleCommandL() function.
    However, I failed everytime when I try to build my application. I don't know the cause,
    below is the buliding info given by VC6

    ********************************************************************************************
    Generating Code...
    Doing first-stage link by name
    link.exe @C:\TEMP\nma00138.
    Creating library \Symbian\6.0\NokiaCPP\EPOC32\BUILD\SYMBIAN\6.0\NOKIACPP\EPOC32EX\CRYSTALUI\MYAPPTEST\MYAPPTEST\WINS\UDEB\MYAPPTEST.lib and object \Symbian\6.0\NokiaCPP\EPOC32\BUILD\SYMBIAN\6.0\NOKIACPP\EPOC32EX\CRYSTALUI\MYAPPTEST\MYAPPTEST\WINS
    \UDEB\MYAPPTEST.exp
    MYAPPTESTAPPUI.obj : error LNK2001: unresolved external symbol "public: static class CEikButtonGroupContainer * __cdecl CEikButtonGroupContainer::Current(void)" (?Current@CEikButtonGroupContainer@@SAPAV1@XZ)
    \Symbian\6.0\NokiaCPP\EPOC32\BUILD\SYMBIAN\6.0\NOKIACPP\EPOC32EX\CRYSTALUI\MYAPPTEST\MYAPPTEST\WINS\UDEB\MYAPPTEST.APP : fatal error LNK1120: 1 unresolved externals
    NMAKE : fatal error U1077: 'link.exe' : return code '0x460'
    Stop.
    if exist "\Symbian\6.0\NokiaCPP\EPOC32\BUILD\SYMBIAN\6.0\NOKIACPP\EPOC32EX\CRYSTALUI\MYAPPTEST\MYAPPTEST\WINS\UDEB\MYAPPTEST.exp" del "\Symbian\6.0\NokiaCPP\EPOC32\BUILD\SYMBIAN\6.0\NOKIACPP\EPOC32EX\CRYSTALUI\MYAPPTEST\MYAPPTEST\WINS\UDEB\MYAPPTES
    T.exp"
    Stopped the build by removing the export object,
    if present, because the pre-link stage failed
    Linking...
    LINK : fatal error LNK1104: cannot open file "\Symbian\6.0\NokiaCPP\EPOC32\BUILD\SYMBIAN\6.0\NOKIACPP\EPOC32EX\CRYSTALUI\MYAPPTEST\MYAPPTEST\WINS\UDEB\MYAPPTEST.exp"
    Error executing link.exe.

    MYAPPTEST.APP - 4 error(s), 2 warning(s)
    ********************************************************************************************

    by the way, where can I found "Avkon" rather than the current "Eikon" SDK?

    Thanks

  5. #5
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166
    check the SDK docs for which libraries you need to include when using the CEikButtonGroupContainer class.

    Then add them to your mmp class and build the workspace again.

    yucca

  6. #6
    Registered User
    Join Date
    Jan 2004
    Posts
    23
    Thanks yucca and forgive my stupid post,
    since I 'm newbie for symbian...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×