等待对话框要用到的类:
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
};