Constructing and running a dialogs is simple:
void CDlgappAppUi::ConstructL() { BaseConstructL(); iAppView = new (ELeave) CDlgAppMainView; iAppView->ExecuteLD(R_DLGAPP_MAIN_DIALOG); // modeless AddToStackL(iAppView); }
Because the dialog is modeless, CEikDialog::ExecuteLD() returns immediately after being called. The dialog can (and must) be added to the control stack with the CCoeAppUi::AddToStackL() method, because modeless dialogs do not do this for themselves.
The application extends the dialog just as it would normally extend a CCoeControl-derived view in order to achieve the desired functionality. For more information, see Traditional Symbian UI application architecture.