Symbian C++ application start-Up sequence
This is the entry point function for the application: E32Main() calls the application framework to run the application. Further explanation of each step in the sequence is included below:
- NewApplication() factory function is called by the application framework to create the application object. It is a global function, not a member of CMyAppApp and cannot leave.
- CMyAppApp::CreateDocumentL() directly calls CMyAppDocument::NewL().
- First and second phase construction is done here.
- CMyAppDocument::CreateAppUiL() directly calls the default C++ constructor of CMyAppAppUi.
- The default constructor just allocates memory for the object and initialises all members to 0.
- CMyAppAppUi::ConstructL() creates the container. BaseConstructL() is always called in this method.
- The container object is created here (this is not a view-based application).
- CMyAppContainer::SetMopParent() sets the parent of the container to be the App UI. This is necessary if the container needs to use the scroll bar(scroll bars will be covered in the “UI Features” module).
- CMyAppContainer::ConstructL() is called to perform second-phase construction
of the container. Note that a TRect& is passed through to the container at this stage. The container is not drawn until CCoeControl::ActivateL() is called and control is returned to the active scheduler (the application’s event loop). Therefore if any size calculations need to be done at construction time, the area of the container needs to be passed in by the App Ui.
When the application process starts, E32Main() is called.