×
Namespaces

Variants
Actions
Revision as of 07:05, 26 July 2012 by hamishwillee (Talk | contribs)

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

Stock dialog boxes

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Article
Created: lpvalente (26 Jun 2007)
Last edited: hamishwillee (26 Jul 2012)

Introduction

The user interface components an application uses should be defined in the resource files (.rss). However, for simple dialog boxes, there are already some of them ready to use.

CEikonEnv

The CEikonEnv class provides some methods to display simple messages. For example:

static void InfoWinL (const TDesC& aFirstLine1, const TDesC& aSecondLine2);
 
static TBool QueryWinL (const TDesC &aFirstLine, const TDesC &aSecondLine);

The first one displays a modal dialog box with two lines of text. The second method displays a modal query dialog with two lines of text and "yes/no" options. If the user chooses "yes", the function returns ETrue, if the user chooses "no", then the function returns EFalse. Both dialog boxes have no icons. There variations of those functions that accept resource ids instead of descriptors. For more information, please consult CEikonEnv documentation [1].

Usage:

_LIT (KLine1, "line 1");
_LIT (KLine2, "line 2");
 
CEikonEnv::Static()->InfoWinL (KLine1, KLine2);
This page was last modified on 26 July 2012, at 07:05.
46 page views in the last 30 days.
×