S60 3rd Edition
肖像模式->View1->风景模式(设备翻转)->切换到View->肖像模式(设备翻转)->View2中的CBA动态更新。但无法显示
TKeyResponse Ctest1Container2::OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType) { if(aKeyEvent.iCode == EKeyOK) { if(iCba == R_AVKON_SOFTKEYS_OPTIONS_BACK) { CEikButtonGroupContainer* cba = CEikButtonGroupContainer::Current(); cba->SetCommandSetL(R_AVKON_SOFTKEYS_CANCEL); cba->MakeVisible(EFalse); //Add this line to the source code cba->DrawNow(); cba->MakeVisible(ETrue); //Add this line to the source code //CEikonEnv::Static()->InfoWinL(_L("info"), _L("hi")); iCba = R_AVKON_SOFTKEYS_CANCEL; } else { CEikButtonGroupContainer* cba = CEikButtonGroupContainer::Current(); cba->SetCommandSetL(R_AVKON_SOFTKEYS_OPTIONS_BACK); cba->MakeVisible(EFalse); //Add this line to the source code cba->DrawNow(); cba->MakeVisible(ETrue); //Add this line to the source code //CEikonEnv::Static()->InfoWinL(_L("info"), _L("hi")); iCba = R_AVKON_SOFTKEYS_OPTIONS_BACK; } return EKeyWasConsumed; } return EKeyWasNotConsumed; }
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/17096048/viewspace-591096/ ,如需转载,请注明出处,否则将追究法律责任。