Symbian前后台转换程序

    技术2022-05-12  10

    //The code above show you steps that will send your GUI application to the backgroundvoid CAirLightAppUi::SendToBackground() {    TApaTask task ( CEikonEnv::Static()->WsSession() );

        task.SetWgId( CEikonEnv::Static()->RootWin().Identifier() );

        task.SendToBackground(); }

    //The code above show you steps that will send your GUI application to the BringToForegroundvoid CAirLightAppUi::BringToForeground() {    TApaTask task ( CEikonEnv::Static()->WsSession() );

        task.SetWgId( CEikonEnv::Static()->RootWin().Identifier() );        task.BringToForeground(); }

    // Handles changes in keyboard focus when an application switches to, or from, the foreground.void CAirLightAppUi::HandleForegroundEventL(TBool  aForeground) { if (aForeground)  {  BringToForeground();  } else  {  SendToBackground();  } }


    最新回复(0)