symbian 积累一点点
CEikonEnv::Static()->LeaveWithInfoMsg(R_TASKMANAGER_NO_IAPS_DEFINED);
#define LOGSTRING "[%02d:%02d:%02d]: %s/n"
TBuf8<KMaxFileName> filename;
filename.Format(_L8(LOGSTRING), t->tm_hour, t->tm_min, t->tm_sec, aMsg ? aMsg : "");
想要在调试输出窗口中显示信息,只需要加入类似下面的语句
RDebug::Print(_L("这段文件将在调试输出窗口中输出"));
弹出窗口
1.
CEikonEnv::Static()->InfoWinL(_L("This is a good test"), _L("Greate") );
2.
TRAPD(err,
CAknInformationNote* informationNote = new (ELeave) CAknInformationNote;
informationNote->ExecuteLD(aMessage);
);
if (err != KErrNone)
{
User::Panic (_L("Helper"), 1);
}
3.
TPtrC messagePtrC(aText);
CAknMessageQueryDialog *dlg=CAknMessageQueryDialog::NewL(messagePtrC);
dlg->PrepareLC(R_AVKON_MESSAGE_QUERY_DIALOG);
dlg->QueryHeading()->SetTextL(aSender);
dlg->RunLD();
4.
CAknGlobalNote* iGlobalNote = CAknGlobalNote::NewL(); //Initialize the note
CleanupStack::PushL(iGlobalNote);
iGlobalNote->ShowNoteL(EAknGlobalInformationNote,aDes);
CleanupStack::PopAndDestroy(); // globalNote
显示输入帐号/密码
// Query user name and password
TBuf<KDefaultBufferSize> userName;
TBuf<KDefaultBufferSize> password;
CAknMultiLineDataQueryDialog* dlg =
CAknMultiLineDataQueryDialog::NewL(userName, password);
if (!dlg->ExecuteLD(R_DIALOG_USER_PASSWORD_QUERY))
return EFalse; // No credentials given; must return EFalse
// Set aUsername and aPassword
TBuf8<KDefaultBufferSize> temp;
temp.Copy(userName);
TRAPD(err, aUsername = aRealm.Pool().OpenStringL(temp));
if (!err)
{
temp.Copy(password);
TRAP(err, aPassword = aRealm.Pool().OpenStringL(temp));
if (!err) return ETrue;
}