关于symbian进度条的问题
这是我的symbian开发(carbide c++)的资源文件:[size=18px][/size]case
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;
};
}
};
}
这是我在UI的HandleCommandL中的调用代码:[i][/i][size=24px][/size]EHelloWorldBasicCommand4:
{
//初始化进度条
CEikProgressInfo* iProgressInfo;
//此处SDK Help介绍的比较奇怪
CAknProgressDialog* iProgressDialog = new ( ELeave ) CAknProgressDialog( reinterpret_cast<CEikDialog**>(&iProgressDialog));
//iProgressDialog->SetCallback( this );
//iProgressDialog->PrepareLC( R_RESOURCE_PROGRESS_NOTE ); //从资源文件构造对话框,资源见下面的定义
iProgressDialog->ExecuteLD(R_RESOURCE_PROGRESS_NOTE);
iProgressInfo = iProgressDialog->GetProgressInfoL();
//iProgressInfo->SetContainerWindowL(*iAppView);
TInt aMaxValue=100;
TInt aStep=5;
iProgressInfo->SetFinalValue(aMaxValue); //设置进度条的最大值
iProgressDialog->RunLD();
//iProgressDialog->ExecuteLD(R_RESOURCE_PROGRESS_NOTE);
//更新进度条
iProgressInfo->IncrementAndDraw(aStep);
//结束进度条
iProgressDialog->ProcessFinishedL();
delete iProgressDialog;
delete iProgressInfo;
}
break;
可只要一运行在SetFinalValue处就出现E32USER-CBASE 63错误(我没有进行无效的Pop()啊!!),郁闷死啦!!
大哥大姐们,帮帮忙啊!!谢啦!!!
[解决办法]
// iProgressDialog->SetCallback( this );
// iProgressDialog->PrepareLC( R_RESOURCE_PROGRESS_NOTE ); //从资源文件构造对话框,资源见下面的定义
iProgressDialog->ExecuteLD(R_RESOURCE_PROGRESS_NOTE);
这几句话你为什么要注释掉它的,写成自己的?