Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

如何改变程序所属窗口组?

From Wiki
Jump to: navigation, search
Article Metadata

文章
huwell 在 30 Aug 2007 创建
最后由 hamishwillee 在 15 Dec 2011 编辑
  • 设备, 软件 版本:

S60 3rd Edition

S60 3rd Edition, FP1



  • 详细描述

可以在退出一个程序后选择一个任务运行在前台。缺省情况下,如果程序是从菜单启动,那菜单程序将被置于前台。

但我们可以通过下列方法来改变程序所属窗口组:

void RWindowGroup::SetOwningWindowGroup( TInt aIdentifier );


  • 解决方案

下列代码示例演示了如何将待机屏幕设置为其所属窗口组(在S60第三版中),这样当程序退出后,将回到待机界面。

#include <apgtask.h>    // link against apgrfx.lib, ws32.lib
 
const TUid KUidPhoneIdle = { 0x101fd64c };
 
TApaTaskList taskList( iCoeEnv->WsSession() );
 
TApaTask task = taskList->FindApp( KUidPhoneIdle );
 
if( task.Exists() )
 
{
 
iCoeEnv->RootWin().SetOwningWindowGroup( task.WgId() );
 
}
This page was last modified on 15 December 2011, at 10:04.
68 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×