Simple About dialog
Article Metadata
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 = "";
};
}
};
}


19 Sep
2009
This example illustrates how to realize a popular feature of most projects - simple about dialog.
Code snippet contains all necessary information - you could just copy this example in your project. Do not forget - you must define "About" message in all supported languages. You could use particular lxx-file (l01 - for English, l16 - for Russian and etc.) for defining this message.