WEB开发网
开发学院手机开发Symbian 开发 Symbian 常用 Dialog 阅读

Symbian 常用 Dialog

 2010-02-09 03:55:00 来源:WEB开发网   
核心提示:使用方法:Code://初始化进度条CAknProgressDialog* iProgressDialog;CEikProgressInfo* iProgressInfo;iProgressDialog = new ( ELeave ) CAknProgressDialog( reinterpret_cast( &iP

使用方法:

Code:

//初始化进度条

CAknProgressDialog* iProgressDialog;

CEikProgressInfo* iProgressInfo;

iProgressDialog = new ( ELeave ) CAknProgressDialog( reinterpret_cast

( &iProgressDialog ) );

iProgressDialog->SetCallback( this );

iProgressDialog->PrepareLC( R_RESOURCE_PROGRESS_NOTE ); //从资源文件构造对话框,资源见下面的定义

iProgressInfo = iProgressDialog->GetProgressInfoL();

iProgressInfo->SetFinalValue( aMaxValue ); //设置进度条的最大值(结束值)

iProgressDialog->RunLD();

//更新进度条

iProgressInfo->IncrementAndDraw( aStep );

//结束进度条

iProgressDialog->ProcessFinishedL();

delete iProgressDialog;

RESOURCE DIALOG R_RESOURCE_PROGRESS_NOTE //进度条对话框资源

{

flags = EAknProgressNoteFlags;

buttons = R_AVKON_SOFTKEYS_CANCEL;

items =

{

DLG_LINE

{

type = EAknCtNote;

id = EMagicBoxCtrlIdProgressNote;

control = AVKON_NOTE

{

layout = EProgressLayout;

singular_label = "对话框中显示的文字";

plural_label = "download";

imagefile = AVKON_BMPFILE_NAME; //第二版中 图标文件为 #define AVKON_BMPFILE_NAME "z:\system\data\avkon.mbm"

imageid = EMbmAvkonQgn_note_sml; //这两项可更改显示不同图标

imagemask = EMbmAvkonQgn_note_sml_mask;

};

}

};

}

4、等待对话框

等待对话框要用到的类:

CAknGlobalNote

头文件:aknglobalnote.h

lib:aknnotify.lib eiksrv.lib

使用方法:

Code:

//显示等待对话框

CAknGlobalNote* globalNote = CAknGlobalNote::NewL();

CleanupStack::PushL( globalNote );

上一页  1 2 3 4 5 6  下一页

Tags:Symbian 常用 Dialog

编辑录入:coldstar [复制链接] [打 印]
赞助商链接