Symbian 控件架构之对话框
2010-04-20 15:44:00 来源:WEB开发网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 );
TInt iWaitNoteId = globalNote->ShowNoteL( EAknGlobalWaitNote, _L("对话框中显示的文字") );
CleanupStack::PopAndDestroy();
//结束等待对话框
CAknGlobalNote * note = CAknGlobalNote::NewL();
CleanupStack::PushL( note );
note->CancelNoteL( iWaitNoteId );
CleanupStack::PopAndDestroy();
注:
CAknGlobalNote类除了显示等待对话框外还可显示多种类型的全局对话框,具体类型可通过ShowNoteL的第一个参数指定,可能的类型如下:
Code:
enum TAknGlobalNoteType
{
EAknGlobalInformationNote = 1,
EAknGlobalWarningNote,
EAknGlobalConfirmationNote,
EAknGlobalErrorNote,
EAknGlobalChargingNote,
EAknGlobalWaitNote,
EAknGlobalPermanentNote,
EAknGlobalNotChargingNote,
EAknGlobalBatteryFullNote,
EAknGlobalBatteryLowNote,
EAknGlobalRechargeBatteryNote,
EAknCancelGlobalNote,
EAknGlobalTextNote
};
5、询问对话框
询问对话框用到的类:
更多精彩
赞助商链接