• 使S60程序全屏运行,fullscreen


    代码如下:

    #include <avkon.rsg>
    #include <eikbtgpc.h>
    #include <eikspane.h>

    //-----------------------------------------------------------------------------
    // CFullScreenAppAppUi::ConstructL()
    //-----------------------------------------------------------------------------
    //
    void CMyFullscreenAppUi::ConstructL()
        {
        
    // Initialise app UI with standard value.
        BaseConstructL(CAknAppUi::EAknEnableSkin);
        
        
    // 1.Hide the softkey area(CBA)
        CEikButtonGroupContainer * softkeyGroup = Cba();
        if(softkeyGroup)
            {
            softkeyGroup->SetCommandSetL(R_AVKON_SOFTKEYS_EMPTY);
            softkeyGroup->MakeVisible(EFalse);
            }
        
        
    // 2.Hide the status pane, will call HandleStatusPaneSizeChange
        CEikStatusPane* statusPane = StatusPane();
        if(statusPane &&
                statusPane->CurrentLayoutResId() != R_AVKON_STATUS_PANE_LAYOUT_EMPTY)
            {
            statusPane->SwitchLayoutL(R_AVKON_STATUS_PANE_LAYOUT_EMPTY);
            statusPane->MakeVisible(EFalse);
            }
        
        
    // 3.set the fullscreen flag
        if( !IsFullScreenApp() )
            SetFullScreenApp(ETrue);
        
        
    // Create view object, and the ClientRect() return the whole size of screen.
        iMyFullscreenAppView = CMyFullscreenAppView::NewL(ClientRect());
        
        ...
    // other code
        
        }


    //----------------------------------------------------------------------------
    // CMyFullscreenAppUi::HandleStatusPaneSizeChange()
    // Called by the framework when the application status pane
    // size is changed. Passes the new client rectangle to the AppView
    // -----------------------------------------------------------------------------
    //
    void CMyFullscreenAppUi::HandleStatusPaneSizeChange()
        {
        CAknAppUi::HandleStatusPaneSizeChange();
        
    // It's important to check iMyFullscreenAppView is NULL or not
        if(iMyFullscreenAppView)
            iMyFullscreenAppView->SetRect(ClientRect());
        }


    注: 与 无状态面板的资源体(R_AVKON_STATUS_PANE_LAYOUT_EMPTY) 对应的 普通状态面板的资源体(R_AVKON_STATUS_PANE_LAYOUT_USUAL)。
  • 相关阅读:
    vi编辑器
    在shell脚本中使用函数
    在shell脚本中进行条件控制以及使用循环
    shell指令expr和test指令
    利用ps指令查看某个程序的进程状态
    shell变量的使用
    创建和运行shell脚本程序
    关于强制类型转换(c语言)
    elastic 常用查询操作
    elastic 集群安装
  • 原文地址:https://www.cnblogs.com/zziss/p/2026356.html
Copyright © 2020-2023  润新知