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.

Revision as of 04:40, 30 May 2013 by hamishwillee (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Simple About dialog

From Wiki
Jump to: navigation, search
Article Metadata
Article
Created: symbianyucca (30 Mar 2007)
Last edited: hamishwillee (30 May 2013)

Following sample code illustrates how you could use CAknMessageQueryDialog to show your application’s about dialog. With the example the about text is defined as constant literal (you could use other ways as well) and the about dialogs title is set to show the application’s name:


Source code

in your l01-file:

#define about_text "App Name\n"\
"Version x.xx.xxx\n"\
"For S60 Symbian OS 9\n"\
"\n"\
"(c) Author\n"\
"2009, All right reserved.\n"\
"\n"\
"EMail:\n"\
"your_address@mail.com"

in rls-file you should include necessary files:

#ifdef LANGUAGE_01
#include "YourProject.l01"
#endif

in your rss-file you should define:

#include "YourProject.rls"
 
RESOURCE TBUF r_about_text { buf = about_text; }


in app ui file:

#include <aknmessagequerydialog.h>
#include "YourRssFile.rsg"
 
void CYourClass::ShowAboutInfoL()
{
_LIT( KtxApplicationName, "Your App Name" );
TBuf<512> mess;
HBufC *aboutText = StringLoader::LoadLC(R_ABOUT_TEXT);
TPtr ptr = aboutText->Des ();
CAknMessageQueryDialog *dlg = CAknMessageQueryDialog::NewL(ptr);
dlg->PrepareLC(R_ABOUT_DIALOG);
dlg->SetHeaderTextL (KtxApplicationName);
dlg->RunLD();
CleanupStack::PopAndDestroy(aboutText);
}

Resource definition

RESOURCE DIALOG r_about_dialog
{
flags=EEikDialogFlagNoDrag |EEikDialogFlagCbaButtons |EEikDialogFlagWait;
buttons = R_AVKON_SOFTKEYS_BACK;
items =
{
DLG_LINE
{
type = EAknCtPopupHeadingPane;
id = EAknMessageQueryHeaderId;
control = AVKON_HEADING
{
headinglayout = R_AVKON_LIST_HEADING_PANE_POPUPS;
};
},
DLG_LINE
{
type = EAknCtMessageQuery;
id = EAknMessageQueryContentId;
control = AVKON_MESSAGE_QUERY
{
message = "";
};
}
};
}
 
This page was last modified on 30 May 2013, at 04:40.
80 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.

×