int main(int argc, char ** argv) { QApplication Application(argc, argv); CMainWindow *Window; QApplication::setOrganizationName("HoSpLo"); QApplication::setApplicationName("HoSpLo"); QTranslator qtTranslator; qtTranslator.load("qt_" + QLocale::system().name(), QLibraryInfo::location(QLibraryInfo::TranslationsPath)); Application.installTranslator(&qtTranslator); QTranslator Translator; Translator.load("HoSpLo_" + QLocale::system().name(), ":/translations"); Application.installTranslator(&Translator); Window = new CMainWindow(); CUnitSync::instance()->load(); Window->show(); int ReturnCode = Application.exec(); delete CBattleroomManager::instance(); delete CBattleManager::instance(); delete CChatManager::instance(); delete CDownloadManager::instance(); delete CNetworkClient::instance(); delete CUnitSync::instance(); return ReturnCode; }
virtual void run() { CMainWindow* mw = Rhodes_getMainWindow(); #ifndef RHODES_EMULATOR mw->closeNativeView(); #endif //delete this; }
int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPWSTR lpCmdLine, int nCmdShow) { base::warcraft3::command_line cmd; if (cmd.has(L"launchwar3")) { bool launch_warcraft3(base::warcraft3::command_line&); launch_warcraft3(cmd); return 1; } try { base::com::guard com; DuiLib::CPaintManagerUI::SetInstance(hInstance); CMainWindow* pFrame = new CMainWindow(); pFrame->Create(NULL, L"YDWEÅäÖóÌÐò", UI_WNDSTYLE_DIALOG, 0); pFrame->CenterWindow(); pFrame->ShowWindow(true); DuiLib::CPaintManagerUI::MessageLoop(); } catch (std::exception const& e) { ::MessageBoxW(NULL, base::u2w(e.what(), base::conv_method::replace | '?').c_str(), L"ERROR", MB_ICONERROR | MB_OK); } catch (...) { ::MessageBoxA(NULL, boost::current_exception_diagnostic_information().c_str(), "ERROR", MB_ICONERROR | MB_OK); } return 0; }
// windows/tabs void CKGM::openMainWindow(void) { CMainWindow *pMainWindow = getWindowManager()->addMainWindow(); getWindowManager()->setMainWindow(pMainWindow); pMainWindow->setBackgroundColour(0x214E67FF); pMainWindow->setSize(CVector2ui32(1025, 698)); }
int APIENTRY WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow ) { HRESULT hr = CoInitialize(NULL); if (SUCCEEDED(hr)) { { CMainWindow mainWindow; hr = mainWindow.Initialize(hInstance); if (SUCCEEDED(hr)) { MSG msg; while (GetMessage(&msg, NULL, 0, 0) > 0) { TranslateMessage(&msg); DispatchMessage(&msg); } } } CoUninitialize(); } return 0; }
int main( int argc, char* argv[] ) #endif { // Init oexlib oexINIT(); oexInitResources(); // Initialize application object QApplication app( argc, argv ); // Create main window CMainWindow *pWindow = new CMainWindow; if ( !pWindow ) return -1; // Show the window pWindow->show(); // Run the app int res = app.exec(); oexUNINIT(); return res; }
int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPWSTR lpCmdLine, int nCmdShow) { try { base::com::guard com; base::i18n::initialize(base::path::ydwe(true) / "share" / "locale"); base::i18n::set_domain(L"config"); DuiLib::CPaintManagerUI::SetInstance(hInstance); DuiLib::CPaintManagerUI::SetLanguage(base::i18n::get_language()); CMainWindow* pFrame = new CMainWindow(); pFrame->Create(NULL, L"YDWEÅäÖóÌÐò", UI_WNDSTYLE_DIALOG, 0); pFrame->CenterWindow(); pFrame->ShowWindow(true); DuiLib::CPaintManagerUI::MessageLoop(); } catch (std::exception const& e) { ::MessageBoxW(NULL, bee::u2w(e.what()).c_str(), L"ERROR", MB_ICONERROR | MB_OK); } catch (...) { MessageBoxW(NULL, L"Unknown error", L"ERROR", MB_OK | MB_ICONERROR); } return 0; }
int process(int argc, char *argv[]) { QApplication app(argc, argv); QDir translationsDir = QDir(app.applicationDirPath()); translationsDir.cd("../translation"); foreach (const QString &fileName, translationsDir.entryList(QStringList() << "*.qm", QDir::Files)) { QTranslator *pTranslator = new QTranslator(&app); pTranslator->load(translationsDir.absoluteFilePath(fileName)); app.installTranslator(pTranslator); } Core::registerMetaTypes(); if (app.arguments().contains("--trace")) QLogger::instance()->setLogLevel(QLogger::LogLevel_Trace); ExperimentPlugin::CPluginsHost pluginsHost; QDir pluginsDir = QDir(app.applicationDirPath()); pluginsDir.cd("../plugins"); pluginsHost.loadPlugins(pluginsDir.absolutePath()); CMainWindow *pMainWindow = new CMainWindow(pluginsHost); pMainWindow->show(); int res = app.exec(); delete pMainWindow; pluginsHost.unloadPlugins(); return res; }
int main(int argc, char *argv[]) { QApplication a(argc, argv); CMainWindow w; w.show(); return a.exec(); }
virtual void run() { CMainWindow* mw = Rhodes_getMainWindow(); #if !defined(RHODES_EMULATOR) && !defined(RHODES_WIN32) mw->closeNativeView(); #endif //delete this; }
void CRhodesModule::RunMessageLoop( ) throw( ) { #ifdef RHODES_EMULATOR m_appWindow.MessageLoop(); #else m_appWindow.getWebKitEngine()->RunMessageLoop(m_appWindow); #endif #if defined(OS_WINCE)&& !defined( OS_PLATFORM_MOTCE ) if (g_hNotify) RegistryCloseNotification(g_hNotify); if ( g_hNotifyCell ) RegistryCloseNotification(g_hNotifyCell); CGPSController* pGPS = CGPSController::Instance(); pGPS->DeleteInstance(); #endif rho_ringtone_manager_stop(); #if !defined(_WIN32_WCE) rho_clientregister_destroy(); #endif #ifdef RHODES_EMULATOR m_appWindow.DestroyUi(); #endif rho::common::CRhodesApp::Destroy(); net::CNetRequestImpl::deinitConnection(); }
int main(int argc, char *argv[]) { QApplication vApplication(argc , argv); CMainWindow vMainWindow; vMainWindow.show(); return vApplication.exec(); }
virtual void run() { CMainWindow* mw = Rhodes_getMainWindow(); String sn(mView->factory_holder->viewtype); #ifndef RHODES_EMULATOR mw->openNativeView(mView->factory_holder->factory, mView->n_view, sn); #endif //delete this; }
// Entry point for the application int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { UNREFERENCED_PARAMETER(hPrevInstance); UNREFERENCED_PARAMETER(lpCmdLine); CMainWindow application; return application.Run(hInstance, nCmdShow); }
void CEditMetadata::OnOK() { // TODO: Add extra validation here UpdateData(TRUE); CMainWindow *pwin = (CMainWindow *)parentDialog; pwin->ProcessEditMetadataDone(this); CDialog::OnOK(); }
void CTestWindow::OnInitialUpdate() { // Get a pointer to the CMainWnd object CMainWindow* pMainWnd = GetPerfApp()->GetMainWnd(); // Post a message to MainWnd when the window is created. pMainWnd->PostMessage(WM_WINDOWCREATED, 0, 0); }
/// <summary> /// Entry point for the application /// </summary> /// <param name="hInstance">Handle to the application instance</param> /// <param name="hPrevInstance">Always 0</param> /// <param name="lpCmdLine">Command line arguments</param> /// <param name="nCmdShow">Whether to display minimized, maximized, or normally</param> /// <returns>status</returns> int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow) { EnsureIndependentResourcesCreated(); CMainWindow application; int result = application.Run(); DiscardIndependentResources(); return result; }
bool CAPP::OnInit() { CMainWindow *frame = new CMainWindow( _("Memory Manager 3000"), wxPoint(50, 50), wxSize(800, 420),wxCAPTION); frame->Center(); frame->Show(true); frame->SetMaxSize(wxSize(800,420)); frame->SetMinSize(wxSize(800,420)); SetTopWindow(frame); return true; }
int main(int argc, char * argv[]) { //QTextCodec::setCodecForTr( QTextCodec::codecForName("UTF-8") ); //QTextCodec::setCodecForCStrings( QTextCodec::codecForName("UTF-8") ); QApplication app(argc, argv); CMainWindow mainWindow; mainWindow.show(); return app.exec(); //Test }
int main(int argc, char *argv[]) { debugMessages.clear(); qInstallMessageHandler(stdConsoleOutput); QApplication a(argc, argv); CMainWindow w; w.show(); return a.exec(); }
int main(int argc, char *argv[]) { QApplication::setApplicationName("uloz-to-client"); QApplication::setOrganizationDomain("dev-z.cz"); QTextCodec::setCodecForTr(QTextCodec::codecForName("utf8")); QApplication a(argc, argv); CMainWindow w; w.show(); return a.exec(); }
int APIENTRY _tWinMain( __in HINSTANCE hInstance, __in_opt HINSTANCE hPrevInstance, __in LPSTR lpCmdLine, __in int nShowCmd ) { //This UI is so simple that can run independently without the support of COM library DuiLib::CPaintManagerUI::SetInstance(hInstance); CMainWindow* pCheckWnd = new CMainWindow(_T("MainWindow.xml")); pCheckWnd->Create(NULL, _T("CheckWnd"), UI_WNDSTYLE_FRAME, WS_EX_WINDOWEDGE); pCheckWnd->ShowModal(); delete pCheckWnd; return 0; }
void CThumbnailFolder::OnPictureClick(CThumbnailData * data) { CMainWindow * mainWindow = (CMainWindow *)this->FindWindowById(MAINVIEWERWINDOWID); if (mainWindow != nullptr) { wxCommandEvent evt(wxEVT_COMMAND_TEXT_UPDATED, wxEVENT_ONPICTURECLICK); evt.SetExtraLong(data->GetNumPhotoId()); mainWindow->GetEventHandler()->AddPendingEvent(evt); } //mainWindow->PictureClick(data->GetNumPhotoId(), false); }
void CIEBrowserEngine::RunMessageLoop(CMainWindow& mainWnd) { MSG msg; while (GetMessage(&msg, NULL, 0, 0)) { if (RHODESAPP().getExtManager().onWndMsg(msg) ) continue; IDispatch* pDisp; SendMessage(m_hwndTabHTML, DTM_BROWSERDISPATCH, 0, (LPARAM) &pDisp); // New HTMLVIEW message if (pDisp != NULL) { // If the Key is back we do not want to translate it causing the browser // to navigate back. if ( ((msg.message != WM_KEYUP) && (msg.message != WM_KEYDOWN)) || (msg.wParam != VK_BACK) ) { IOleInPlaceActiveObject* pInPlaceObject; pDisp->QueryInterface( IID_IOleInPlaceActiveObject, (void**)&pInPlaceObject ); HRESULT handleKey = pInPlaceObject->TranslateAccelerator(&msg); } } if (!mainWnd.TranslateAccelerator(&msg)) { TranslateMessage(&msg); DispatchMessage(&msg); } if(msg.message == WM_PAINT) RHODESAPP().getExtManager().onHTMLWndMsg(msg); } }
void CRhodesModule::RunMessageLoop( ) throw( ) { m_appWindow.getWebKitEngine()->RunMessageLoop(m_appWindow); #if defined(OS_WINCE) if(RHO_IS_WMDEVICE) { if (g_hNotify) lpfn_Registry_CloseNotification(g_hNotify); if ( g_hNotifyCell ) lpfn_Registry_CloseNotification(g_hNotifyCell); CGPSController* pGPS = CGPSController::Instance(); pGPS->DeleteInstance(); } #endif rho_ringtone_manager_stop(); rho::common::CRhodesApp::Destroy(); // ReleaseMutex(m_hMutex); rho_platform_check_restart_application(); }
int main(int argc, char *argv[]) { CFileCommanderApplication app(argc, argv); app.setOrganizationName("GitHubSoft"); app.setApplicationName("File Commander"); CSettings::setApplicationName(app.applicationName()); CSettings::setOrganizationName(app.organizationName()); CMainWindow w; w.updateInterface(); app.setMainWindow(&w); return app.exec(); }
//int xse_main() int main(int argc, char** argv) { //Get params //printf( "start\n" ); QApplication Application( argc, argv ); CMainWindow MainWnd; MainWnd.Init( &g_SampleMgr ); MainWnd.show(); Application.exec(); g_SampleMgr.UnregisterSamples(); g_SampleMgr.DestroyEngine(); return 0; }
/// <summary> /// Callback to handle Kinect status changes /// </summary> /// <param name="hrStatus">current status</param> /// <param name="instanceName">instance name of Kinect the status change is for</param> /// <param name="uniqueDeviceName">unique device name of Kinect the status change is for</param> /// <param name="pUserData">additional data</param> void CALLBACK CMainWindow::StatusProc(HRESULT hrStatus, const OLECHAR* instanceName, const OLECHAR* uniqueDeviceName, void * pUserData) { CMainWindow* window = reinterpret_cast<CMainWindow *>(pUserData); // Check if the Kinect sensor who's status changed is the one the sample is currently connected to. // Otherwise, we can ignore the status change. This check is done in case there are multiple Kinect sensors // plugged into the machine. // If the status change is not S_OK, then disable the menus. BSTR deviceConnectionId = window->GetKinectDeviceConnectionId(); int compareResult = lstrcmp(instanceName, deviceConnectionId); if (compareResult == 0 && FAILED(hrStatus)) { window->DisableMenus(); } }
BOOL AtheroApp::InitInstance() { // Standard initialization // If you are not using these features and wish to reduce the size // of your final executable, you should remove from the following // the specific initialization routines you do not need. Enable3dControls(); LoadStdProfileSettings(); // Load standard INI file options (including MRU) CMainWindow dlg; m_pMainWnd = &dlg; dlg.DoModal(); // Since the dialog has been closed, return FALSE so that we exit the // application, rather than start the application's message pump. return FALSE; }
int main(int argc, char *argv[]) { AdvancedAssert::setLoggingFunc([](const char* message){ qDebug() << message; }); CFileCommanderApplication app(argc, argv); app.setOrganizationName("GitHubSoft"); app.setApplicationName("File Commander"); CSettings::setApplicationName(app.applicationName()); CSettings::setOrganizationName(app.organizationName()); CMainWindow w; w.updateInterface(); const int retCode = app.exec(); return retCode; }