WEB开发网
开发学院手机开发Symbian 开发 Symbian 如何显示关于对话框 阅读

Symbian 如何显示关于对话框

 2010-04-20 15:43:00 来源:WEB开发网   
核心提示://Symbian 如何显示关于对话框//显示关于对话框void CContainerView::DialogAbout(TInt aTitleId,TInt aContentsId){CAknMessageQueryDialog* dlg = new (ELeave) CAknMessageQueryDialog()

//Symbian 如何显示关于对话框

//显示关于对话框

void CContainerView::DialogAbout(TInt aTitleId,TInt aContentsId)

{

CAknMessageQueryDialog* dlg = new (ELeave) CAknMessageQueryDialog();

dlg->PrepareLC(R_ABOUT_QUERY_DIALOG);

HBufC* title = iEikonEnv->AllocReadResourceLC(aTitleId);

dlg->QueryHeading()->SetTextL(*title);

CleanupStack::PopAndDestroy(); //title

HBufC* msg = iEikonEnv->AllocReadResourceLC(aContentsId);

dlg->SetMessageTextL(*msg);

CleanupStack::PopAndDestroy(); //msg

dlg->RunLD();

}

// 关于对话框资源

RESOURCE DIALOG r_about_query_dialog

{

flags = EGeneralQueryFlags | EEikDialogFlagNoBorder | EEikDialogFlagNoShadow;

buttons = R_AVKON_SOFTKEYS_OK_EMPTY;

items=

{

DLG_LINE

{

type = EAknCtPopupHeadingPane;

id = EAknMessageQueryHeaderId;

itemflags = EEikDlgItemNonFocusing;

control = AVKON_HEADING

{

};

},

DLG_LINE

{

type = EAknCtMessageQuery;

id = EAknMessageQueryContentId;

control = AVKON_MESSAGE_QUERY

{

};

}

};

}

//字符串资源

RESOURCE TBUF r_about_dialog_title { buf=qtn_about_dialog_title; }

RESOURCE TBUF r_about_dialog_text {buf=qtn_about_dialog_text;}

//字符串语言定义

#define qtn_about_dialog_title "About"

#define qtn_about_dialog_text "ZhangjianNotepad Verion 1.0.0

Author:Zhangjian Support:Zhangjian@suteng.com

Addr:http://www.zhangjian.cc (c)1.0.0 "

Tags:Symbian 如何 显示

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