Symbian 得到左右软键项(CBA)的内容

CEikButtonGroupContainer* cba = CEikButtonGroupContainer::Current();
if (cba)
    {
    MEikButtonGroup* buttonGroup = cba->ButtonGroup();
    for (TInt pos = 0; pos < 3; pos++)
        {
        TInt cmdId = buttonGroup->CommandId(pos);
        CCoeControl* button = buttonGroup->GroupControlById(cmdId);
        if (button && buttonGroup->IsCommandVisible(cmdId))
            {
            CEikLabel* label =
                    static_cast<CEikLabel*> (button->ComponentControl(0));
            const TDesC* txt = label->Text();
            }
        }
    }
posted @ 2011-04-24 17:59  zziss  阅读(139)  评论(0编辑  收藏  举报