zoukankan      html  css  js  c++  java
  • 使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)。
  • 相关阅读:
    制作openresty的docker镜像 + nginx笔记 调试rewrite和location Nginx 学习笔记
    C# winform在WebBrowser下获取完整的Cookies(包括含HTTPOnly属性的)
    vscode代码切换大小写的教程
    C#中的Guid
    .NET Framework 版本和依赖关系
    将 Excel 数据导入 SQL Server数据库
    sqlserver各版本的介绍对比
    使用 Visual Studio Code 创建并运行 Transact SQL 脚本
    SQL转Linq工具的使用——Linqer 4.6
    对象之间的映射(AutoMapper集成)
  • 原文地址:https://www.cnblogs.com/zziss/p/2026356.html
Copyright © 2011-2022 走看看