Namespaces
Variants
Actions

Simple About dialog

Jump to: navigation, search
Article Metadata

Article
Created: symbianyucca (30 Mar 2007)
Last edited: hamishwillee (08 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 8 May 2013, at 03:03.
176 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved