コード例 #1
0
ファイル: main.cpp プロジェクト: ObKo/HoSpLo
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;
}
コード例 #2
0
	virtual void run() {
		CMainWindow* mw = Rhodes_getMainWindow();
#ifndef RHODES_EMULATOR
		mw->closeNativeView();
#endif
		//delete this;
	}
コード例 #3
0
ファイル: Main.cpp プロジェクト: BattleNWar/YDWE
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;
}
コード例 #4
0
ファイル: CKGM.cpp プロジェクト: X-Seti/KGM
// windows/tabs
void		CKGM::openMainWindow(void)
{
	CMainWindow *pMainWindow = getWindowManager()->addMainWindow();
	getWindowManager()->setMainWindow(pMainWindow);
	pMainWindow->setBackgroundColour(0x214E67FF);
	pMainWindow->setSize(CVector2ui32(1025, 698));
}
コード例 #5
0
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;
}
コード例 #6
0
ファイル: main.cpp プロジェクト: sanyaade-webdev/winglib
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;
}
コード例 #7
0
ファイル: Main.cpp プロジェクト: actboy168/YDWE
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;
}
コード例 #8
0
ファイル: main.cpp プロジェクト: IlyaOkonsky/gpusim
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;
}
コード例 #9
0
ファイル: main.cpp プロジェクト: rotanov/deku2d-engine
int main(int argc, char *argv[])
{
	QApplication a(argc, argv);
	CMainWindow w;
	w.show();
	return a.exec();
}
コード例 #10
0
    virtual void run() {
        CMainWindow* mw = Rhodes_getMainWindow();
#if !defined(RHODES_EMULATOR) && !defined(RHODES_WIN32)
        mw->closeNativeView();
#endif
        //delete this;
    }
コード例 #11
0
ファイル: Rhodes.cpp プロジェクト: codealot/rhodes
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();
}
コード例 #12
0
ファイル: main.cpp プロジェクト: militia11/in
int main(int argc, char *argv[]) {
    QApplication vApplication(argc
                              , argv);
    CMainWindow vMainWindow;
    vMainWindow.show();

    return vApplication.exec();
}
コード例 #13
0
	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;
	}
コード例 #14
0
// 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);
}
コード例 #15
0
ファイル: EditMetadata.cpp プロジェクト: KolorKode/Stg
void CEditMetadata::OnOK() 
{
	// TODO: Add extra validation here
    UpdateData(TRUE);
    CMainWindow *pwin = (CMainWindow *)parentDialog;
    pwin->ProcessEditMetadataDone(this);
	CDialog::OnOK();
}
コード例 #16
0
ファイル: TestWnd.cpp プロジェクト: quinsmpang/Tools
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);
}
コード例 #17
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;
}
コード例 #18
0
ファイル: APP.cpp プロジェクト: coditza/mm3k
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;
}
コード例 #19
0
ファイル: main.cpp プロジェクト: Gloorf/kustom
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
}
コード例 #20
0
ファイル: main.cpp プロジェクト: kernel1024/qregedit
int main(int argc, char *argv[])
{
    debugMessages.clear();
    qInstallMessageHandler(stdConsoleOutput);

    QApplication a(argc, argv);
    CMainWindow w;
    w.show();

    return a.exec();
}
コード例 #21
0
ファイル: main.cpp プロジェクト: vojtad/uloz-to-client
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();
}
コード例 #22
0
ファイル: main.cpp プロジェクト: raine0524/XmlMidiParser
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;
}
コード例 #23
0
ファイル: ThumbnailFolder.cpp プロジェクト: jfiguinha/Regards
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);

}
コード例 #24
0
ファイル: IEBrowserEngine.cpp プロジェクト: abmahmoodi/rhodes
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);	
    }
}
コード例 #25
0
ファイル: Rhodes.cpp プロジェクト: rhosilver/rhodes-1
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();
}
コード例 #26
0
ファイル: main.cpp プロジェクト: hermixy/file-commander
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();
}
コード例 #27
0
//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;
}
コード例 #28
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();
    }

}
コード例 #29
0
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;
}
コード例 #30
0
ファイル: main.cpp プロジェクト: antis81/file-commander
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;
}