Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

简易“关于”对话框

From Wiki
Jump to: navigation, search
Article Metadata

文章
kcomex 在 01 Apr 2007 创建
最后由 hamishwillee 在 15 Dec 2011 编辑

下面的代码示例演示了如何使用CAknMessageQueryDialog类来显示你的应用程序的“关于”对话框。注意,本例中的“关于”文本实在原代码文件(cpp)中集成的,你同样可以使用读取自RSS资源文件的方式来显示他们:


C++源代码

_LIT(KtxAbbout, "My application and its version \n\n" \
"Copyright me 1999-2007, All right" \
"reserved.\n\nemail:\nme@mymail.com\n" \
"Homepage:\nwww.myhome.com");
_LIT(KtxApplicationName ,"My Application");
 
 
HBufC* Abbout = KtxAbbout().AllocLC();
TPtr Pointter(Abbout->Des());
CAknMessageQueryDialog* dlg = CAknMessageQueryDialog::NewL(Pointter);
dlg->PrepareLC(R_ABOUT_HEADING_PANE);
dlg->SetHeaderTextL(KtxApplicationName);
dlg->RunLD();
 
CleanupStack::PopAndDestroy(Abbout);

资源文件定义

RESOURCE DIALOG r_about_heading_pane
{
flags=EEikDialogFlagNoDrag |EEikDialogFlagCbaButtons |EEikDialogFlagWait;
buttons = R_AVKON_SOFTKEYS_BACK;
items =
{
DLG_LINE
{
type = EAknCtPopupHeadingPane;
id = EAknMessageQueryHeaderId;
control = AVKON_HEADING
{
};
},
DLG_LINE
{
type = EAknCtMessageQuery;
id = EAknMessageQueryContentId;
control = AVKON_MESSAGE_QUERY
{
message = "";
};
}
};
}
This page was last modified on 15 December 2011, at 10:38.
46 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×