×
Namespaces

Variants
Actions

Archived:Multi-line message query dialogs using Symbian C++

From Nokia Developer Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.



Article Metadata
Compatibility
Platform(s): S60 3rd Edition
S60 3rd Edition (initial release)
Article
Created: User:Technical writer 2 (04 Jun 2007)
Last edited: hamishwillee (14 Jun 2012)

Overview

Multi-line message query dialogs

Description

The following code example demonstrates how to use multi-line messages in a message query dialog.

_LIT(KTxtApplicationName, "Application Title");
 
HBufC* sMessage = StringLoader::LoadLC (R_MESSAGE);
HBufC* sTitle = HBufC::NewLC (KTxtApplicationName().Length() );
 
sTitle->Des().Append (KTxtApplicationName);
 
CAknMessageQueryDialog* dialog = new (ELeave) CAknMessageQueryDialog();
CleanupStack::PushL (dialog);
 
dialog->PrepareLC (R_AVKON_MESSAGE_QUERY_DIALOG);
dialog->QueryHeading()->SetTextL (*sTitle);
dialog->SetMessageTextL (*sMessage);
dialog->RunLD();
 
CleanupStack::Pop(); // dialog
CleanupStack::PopAndDestroy(2); // sTitle, sMessage
 
/*
The query message is loaded from the resources. The .rss file should have the following definitions:
 
#define qtn_message "First Line \nSecond Line"
RESOURCE TBUF r_message
{
buf = qtn_message;
}
*/
This page was last modified on 14 June 2012, at 10:38.
38 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.

×