zoukankan      html  css  js  c++  java
  • 让程序用自定义的菜单自定义菜单AVKON_VIEW,CBA,MENU_BAR,MENU_PANE

    // -----------------------------------------------------------------------------
    // help menu avkon
    //在CHelpView::ConstructL()函数中调用
    // -----------------------------------------------------------------------------

    RESOURCE AVKON_VIEW r_help_menu
    {
        menubar 
    = r_help_menu_bar;
        
    //cba = R_AVKON_SOFTKEYS_OPTIONS_EXIT;    
        
    //自定义CBA
        cba = r_help_menu_cba;
    }
    //定义CBA栏
    RESOURCE CBA r_help_menu_cba
    {
    buttons
    =
        {
            AVKON_CBA_BUTTON
            {
                id 
    = EAknSoftkeyOptions;
                txt 
    = qtn_hewb_option;
            },
            AVKON_CBA_BUTTON
            {
                id 
    = EExit;
                txt 
    = qtn_hewb_exit;
            }
        };

    }
    //定义菜单块
    RESOURCE MENU_BAR r_help_menu_bar
    {
    titles 
    =
        {
        MENU_TITLE { menu_pane 
    = r_help_menu_pane; }
        };
    }
    //定义菜单面板
    RESOURCE MENU_PANE  r_help_menu_pane
    {
        items 
    =
            {
            
    // added the new Options menu command here
            MENU_ITEM
                {
                command 
    = EInput;
                txt 
    = qtn_hewb_input;
                
    //cascade =  r_potato_menupane;
                },
            MENU_ITEM
                {
                command 
    = EHelpTwo;
                txt 
    = qtn_hewb_helptwo;
                }
            };
    }

    //定义子菜单的菜单面板
    RESOURCE MENU_PANE  r_potato_menupane
    {
        items 
    =
            {
            
    // added the new Options menu command here
            MENU_ITEM
                {
                command 
    = EMenuPotato1;
                txt 
    = qtn_menu_potato1;
                },
                MENU_ITEM
                {
                command 
    = EMenuPotato2;
                txt 
    = qtn_menu_potato2;
                }
            };
    }


    //控制菜单的显示与隐藏,由系统调用
    void CListView::DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane)
        {
        
    if (aResourceId != R_LIST_MENU_PANE)
            
    return;

        
    //如果没有记录的情况下,就隐藏EListComeCard,EListCallPerson,EListSendCard
        if (0 == iSelectCountNum)
            {
            aMenuPane
    ->SetItemDimmed(EListComeCard, ETrue);
            aMenuPane
    ->SetItemDimmed(EListCallPerson, ETrue);
            aMenuPane
    ->SetItemDimmed(EListSendCard, ETrue);
            }
        
    else
            {
            aMenuPane
    ->SetItemDimmed(EListComeCard, EFalse);
            aMenuPane
    ->SetItemDimmed(EListCallPerson, EFalse);
            aMenuPane
    ->SetItemDimmed(EListSendCard, EFalse);
            }

        }

    大部分转载 小部分自写
  • 相关阅读:
    HDU-3336-Count the string(扩展KMP)
    洛谷-P3805-Manacher模板
    洛谷-p5410-扩展KMP模板
    HDU-2594-Simpsons' Hidden Talents(kmp, 扩展kmp)
    POJ-3080-Blue jeans(KMP, 暴力)
    [办公应用]两个单独的列数据快速变为两列匹配关联数据
    [办公应用]如何将单词中的部分字母加下划线
    [办公应用]word 2007:全屏快捷键,让复制图片保持原样大小(office 全屏快捷键)
    [办公自动化]如何让excel图表标签中显示最新值数据
    [计算机故障处理]无法访问网络共享资源
  • 原文地址:https://www.cnblogs.com/8586/p/2091466.html
Copyright © 2011-2022 走看看