bool UserInterface::OnAppInitializing(AppRegistry& appRegistry) { // TODO: // Initialize UI resources and application specific data. // The application's permanent data and context can be obtained from the appRegistry. // // If this method is successful, return true; otherwise, return false. // If this method returns false, the application will be terminated. // Uncomment the following statement to listen to the screen on/off events. //PowerManager::SetScreenEventListener(*this); // Create a form MainForm *pMainForm = new MainForm(); pMainForm->Initialize(); // Add the form to the frame Frame *pFrame = GetAppFrame()->GetFrame(); pFrame->AddControl(*pMainForm); // Set the current form pFrame->SetCurrentForm(*pMainForm); // Draw and Show the form pMainForm->Draw(); pMainForm->Show(); return true; }
bool DrStrangecodeRssReader::OnAppInitializing(AppRegistry& appRegistry) { // Create a form MainForm *pMainForm = new MainForm(); pMainForm->Initialize(); pMainForm->SetName(kMainFormNameString); ItemForm * pItemForm = new ItemForm(); pItemForm->Initialize(); pItemForm->SetName(kItemFormNameString); // Add the form to the frame Frame *pFrame = GetAppFrame()->GetFrame(); pFrame->AddControl(*pMainForm); pFrame->AddControl(*pItemForm); // Set the current form pFrame->SetCurrentForm(*pMainForm); // Draw and Show the form pMainForm->Draw(); pMainForm->Show(); return true; }