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. Thanks for all your past and future contributions.
Stock dialog boxes
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.
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 .
_LIT (KLine1, "line 1");
_LIT (KLine2, "line 2");
CEikonEnv::Static()->InfoWinL (KLine1, KLine2);