当前位置: 首页>>代码示例>>C++>>正文


C++ CAppModule::AddMessageLoop方法代码示例

本文整理汇总了C++中CAppModule::AddMessageLoop方法的典型用法代码示例。如果您正苦于以下问题:C++ CAppModule::AddMessageLoop方法的具体用法?C++ CAppModule::AddMessageLoop怎么用?C++ CAppModule::AddMessageLoop使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CAppModule的用法示例。


在下文中一共展示了CAppModule::AddMessageLoop方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Run

int Run(LPTSTR /*lpstrCmdLine*/ = NULL, int nCmdShow = SW_SHOWDEFAULT)
{
    CMessageLoop theLoop;
    _Module.AddMessageLoop(&theLoop);

    CMainFrame wndMain;

    if(wndMain.CreateEx() == NULL)
    {
        ATLTRACE(_T("Main window creation failed!\n"));
        return 0;
    }

    wndMain.ShowWindow(nCmdShow);

    int nRet = theLoop.Run();

    _Module.RemoveMessageLoop();

    duWindowManager *wndManager_ = wndMain.getWindowManager();
    if (NULL != wndManager_)
    {
        ReleaseStyle(wndManager_);
    }

    return nRet;
}
开发者ID:xt9852,项目名称:TestSet,代码行数:27,代码来源:Skin.cpp

示例2: Run

int Run(LPTSTR /*lpstrCmdLine*/ = NULL, int nCmdShow = SW_SHOWDEFAULT)
{
	CMessageLoop theLoop;
	_Module.AddMessageLoop(&theLoop);

	CMainFrame wndMain;

	CComArenaHook hook;
	//hook.open();
	//hook.demo7();
	hook.JobShopBuilder();

	if(wndMain.CreateEx() == NULL)
	{
		ATLTRACE(_T("Main window creation failed!\n"));
		return 0;
	}

	wndMain.ShowWindow(nCmdShow);

	int nRet = theLoop.Run();

	_Module.RemoveMessageLoop();
	return nRet;
}
开发者ID:amanrenishaw,项目名称:MTConnectGadgets,代码行数:25,代码来源:ArenaIntegrator.cpp

示例3: Run

int Run(LPTSTR lpstrCmdLine = NULL, int nCmdShow = SW_SHOWDEFAULT)
{
	CMessageLoop theLoop;
	_Module.AddMessageLoop(&theLoop);

	CMainDlg dlgMain;

	if(dlgMain.Create(NULL) == NULL)
	{
		ATLTRACE(_T("Main dialog creation failed!\n"));
		return 0;
	}

	if(dlgMain.openPreview() == NULL)
	{
		ATLTRACE(_T("Preview Window creation failed!\n"));
		return 0;
	}

	dlgMain.ShowWindow(nCmdShow);

	if(lpstrCmdLine){
		char buf[256];
		wcstombs(buf, lpstrCmdLine, sizeof buf);
		dlgMain.OpenModel(buf);
	}

	int nRet = theLoop.Run();

	_Module.RemoveMessageLoop();
	return nRet;
}
开发者ID:msakuta,项目名称:VastSpace,代码行数:32,代码来源:wtltest.cpp

示例4: Run

int App::Run(LPCTSTR /*lpstrCmdLine*/, int nCmdShow)
{
   if (!ParseCommandLine())
      return 0;

   CMessageLoop theLoop;
   _Module.AddMessageLoop(&theLoop);

   MainFrame wndMain;

   if (!m_cszFilename.IsEmpty())
      wndMain.OpenFileAtStart(m_cszFilename);

   if (wndMain.CreateEx() == nullptr)
   {
      ATLTRACE(_T("Main window creation failed!\n"));
      return 0;
   }

   wndMain.ShowWindow(nCmdShow);

   int nRet = theLoop.Run();

   _Module.RemoveMessageLoop();
   return nRet;
}
开发者ID:vividos,项目名称:RemotePhotoTool,代码行数:26,代码来源:App.cpp

示例5: WinMain

int __stdcall WinMain(HINSTANCE hinst, HINSTANCE, PSTR cmdLine, int cmdShow)
{
    _Module.Init(0, hinst, 0);

    CMessageLoop msgLoop;
    _Module.AddMessageLoop(&msgLoop);

    int result = -1;

    CMainFrame frame;

    frame.Create(
        ::GetDesktopWindow(),
        CWindow::rcDefault,
        TEXT("Notepad--"));

    if (frame.IsWindow()) {
        frame.ShowWindow(cmdShow);
        result = msgLoop.Run();
    }

    _Module.RemoveMessageLoop();
    _Module.Term();

    return result;
}
开发者ID:YDS19872712,项目名称:Notepad--,代码行数:26,代码来源:main.cpp

示例6: Run

int Run(LPTSTR /*lpstrCmdLine*/ = NULL, int nCmdShow = SW_SHOWDEFAULT)
{
    // For logging; redirects output so that it works with the allocated console
    if (::AllocConsole()) {
        ::freopen("CONOUT$", "w", stdout);
        auto h = ::GetStdHandle(STD_OUTPUT_HANDLE);
        // For nowide; output is not displayed otherwise
        nowide::cout.set_rdbuf(new nowide::details::my_console_output_buffer(h));
    }

    bool shouldBeVerbose = true;
    if (shouldBeVerbose) {
        using namespace vanhelsing::engine;
        Log::SetLogLevelFilter(LogLevel::Trace);
    }

	CMessageLoop theLoop;
	_Module.AddMessageLoop(&theLoop);

	CMainDlg dlgMain;

	if(dlgMain.Create(NULL) == NULL)
	{
		ATLTRACE(_T("Main dialog creation failed!\n"));
		return 0;
	}

	dlgMain.ShowWindow(nCmdShow);

	int nRet = theLoop.Run();

	_Module.RemoveMessageLoop();
	return nRet;
}
开发者ID:SteffenL,项目名称:Van-Helsing-game-research,代码行数:34,代码来源:main.cpp

示例7: LoadLuaRunTime

extern "C" __declspec(dllexport) void LoadLuaRunTime(char* szInstallDir)
{
	TSTRACEAUTO();
	HRESULT hr = ::CoInitialize(NULL);
	hr = _Module.Init(NULL, gInstance);


	CMessageLoop theLoop;
	_Module.AddMessageLoop(&theLoop);

	CLRTAgent lrtAgent;
	//lrtAgent.InitLua(szInstallDir);
	//g_hXappLuaToolDll = lrtAgent.GetXappLuaToolDllModuleHandle();
	if (lrtAgent.InitLua(szInstallDir))
	{
		TSDEBUG4CXX(_T(">>>>>theLoop.Run()"));
		theLoop.Run();
		TSDEBUG4CXX(_T("<<<<<theLoop.Run()"));
	}
	_Module.RemoveMessageLoop();
	_Module.Term();
	::CoUninitialize();
	TerminateProcess(::GetCurrentProcess(), S_OK);

	return;
}
开发者ID:fanliaokeji,项目名称:lvdun,代码行数:26,代码来源:dllmain.cpp

示例8: Init

static void Init()
{
	theLoop = new CMessageLoop;
	_Module.AddMessageLoop(theLoop);

	con=0;
//	con = new Console;
	printf("an!\n");

	sdInit();
	msInit();

	printf("loading bank at %08x, size %d\n",presetbank,pbsize);

//	fileM presetbank;
//	printf("open: %d\n",presetbank.open(IDR_BANK1));
//	printf("load: %d\n",sdLoad(presetbank));
//	presetbank.close();

	fileM pb;
	pb.open(presetbank,pbsize);
	printf("load: %d\n",sdLoad(pb));

	printf("start audio\n");
#ifdef RONAN
	msStartAudio(0,soundmem,globals,(const char **)speechptrs);
#else
	msStartAudio(0,soundmem,globals);
#endif	

	printf("done\n");

}
开发者ID:Ambrevar,项目名称:fr_public,代码行数:33,代码来源:vstiext.cpp

示例9: Run

int Run(LPTSTR /*lpstrCmdLine*/, int nCmdShow = SW_SHOWDEFAULT)
{
    NetworkInit n;
    if (!n.init())
    {
        msgBox(NULL, IDS_ERROR_INIT_NETWORK, MB_OK|MB_ICONERROR);
        return 0;
    }

#ifndef _DEBUG  // для запуска новых копий клиента из панели задач
    {
        DWORD a = GetFileAttributes(L"gamedata");
        if (a == INVALID_FILE_ATTRIBUTES || !(a&FILE_ATTRIBUTE_DIRECTORY))
        {
            WCHAR path[MAX_PATH+1];
            GetModuleFileName(NULL, path, MAX_PATH);
            WCHAR *p = wcsrchr(path, L'\\');
            int len = p-path+1;
            std::wstring new_cdir(path, len);
            SetCurrentDirectory(new_cdir.c_str());
        }
    }
#endif

	CMessageLoop theLoop;
	_Module.AddMessageLoop(&theLoop);

	if(_wndMain.CreateEx() == NULL)
		return 0;

	int nRet = theLoop.Run();
	_Module.RemoveMessageLoop();
	return nRet;
}
开发者ID:carriercomm,项目名称:tortilla,代码行数:34,代码来源:mudclient.cpp

示例10: Settings

int Settings(HWND hwndParent)
{
	CMessageLoop theLoop;
	_Module.AddMessageLoop(&theLoop);

	CSettingsSheet dlg;
	int nRet = 0;

	if(hwndParent) 
		dlg.DoModal(hwndParent);
	else
	{
		if(dlg.Create(NULL) == NULL)
		{
				ATLTRACE(_T("Settings dialog creation failed!\n"));
				return 0;
		}
		_Module.Lock();
		dlg.ShowWindow(SW_SHOW);
		Sleep(10);
		nRet = theLoop.Run();
		_Module.RemoveMessageLoop();
	}
  return nRet;
}
开发者ID:ebutusov,项目名称:Molecules,代码行数:25,代码来源:Molecules.cpp

示例11: Run

int Run(LPTSTR /*lpstrCmdLine*/ = NULL, int nCmdShow = SW_SHOWDEFAULT)
{
	// set normal priority
	DWORD pid = ::GetCurrentProcessId();
	HANDLE hProc = ::OpenProcess(PROCESS_SET_INFORMATION, TRUE, pid);
	::SetPriorityClass(hProc, NORMAL_PRIORITY_CLASS);
	::CloseHandle(hProc);
	CMessageLoop theLoop;
	_Module.AddMessageLoop(&theLoop);

	CSaverWindow wndMain;
	if(wndMain.Create(NULL, true) == NULL)
	{
		ATLTRACE(_T("Main window creation failed!\n"));
		return 0;
	}

	wndMain.ShowWindow(SW_SHOW);
	Sleep(10);
	wndMain.RunSaver();

	int nRet = theLoop.Run();

	_Module.RemoveMessageLoop();
	return nRet;
}
开发者ID:ebutusov,项目名称:Molecules,代码行数:26,代码来源:Molecules.cpp

示例12: Run

int Run(LPTSTR /*lpstrCmdLine*/ = NULL, int nCmdShow = SW_SHOWDEFAULT)
{
	CMessageLoop theLoop;
	_Module.AddMessageLoop(&theLoop);

	CMainFrame wndMain;

	if(wndMain.CreateEx() == NULL)
	{
		ATLTRACE(_T("Main window creation failed!\n"));
		return 0;
	}

	if (wndMain.m_wp.showCmd == SW_MAXIMIZE)
		nCmdShow = SW_MAXIMIZE;
	if (wndMain.m_wp.rcNormalPosition.right > 0 &&
		wndMain.m_wp.rcNormalPosition.bottom > 0 &&
		wndMain.m_wp.rcNormalPosition.top < wndMain.m_wp.rcNormalPosition.bottom && 
		wndMain.m_wp.rcNormalPosition.left < wndMain.m_wp.rcNormalPosition.right)
		wndMain.MoveWindow(	
			wndMain.m_wp.rcNormalPosition.left, 
			wndMain.m_wp.rcNormalPosition.top, 
			wndMain.m_wp.rcNormalPosition.right-wndMain.m_wp.rcNormalPosition.left, 
			wndMain.m_wp.rcNormalPosition.bottom-wndMain.m_wp.rcNormalPosition.top, FALSE); 
	wndMain.ShowWindow(nCmdShow);

	int nRet = theLoop.Run();

	_Module.RemoveMessageLoop();
	return nRet;
}
开发者ID:steelwil,项目名称:Kolumnz,代码行数:31,代码来源:Kolumnz.cpp

示例13: Run

int Run(LPTSTR /*lpstrCmdLine*/ = NULL, int nCmdShow = SW_SHOWDEFAULT)
{
	if( !RunTimeHelper::IsVista() )
	{
		AtlMessageBox(NULL, L"Windows Vista or greater is required to run this program.");
		return 0;
	}

	CDwm dwm;
	cIsComposited = dwm.DwmIsCompositionEnabled()!=FALSE;

	
	CMessageLoop theLoop;
	_Module.AddMessageLoop(&theLoop);

	int basex = 314;//320
	int basey = 290;//285

	CMainFrame frame;
	if( frame.CreateEx(0, CRect(0, 0, basex, basey))==NULL )
	{
		ATLTRACE(_T("Main window creation failed!\n"));
		return 0;
	}

	_wndMain = frame;
	_wndMain.ShowWindow(nCmdShow);

	int nRet = theLoop.Run();

	_Module.RemoveMessageLoop();
	return nRet;
}
开发者ID:midiway,项目名称:WebPDF,代码行数:33,代码来源:Webpdf.cpp

示例14: Run

int Run(LPTSTR /*lpstrCmdLine*/ = NULL, int nCmdShow = SW_SHOWDEFAULT)
{
	CMessageLoop theLoop;
	_Module.AddMessageLoop(&theLoop);

  CMainDlg dlgMain;

  if(GetCrashInfoThroughPipe(
    dlgMain.m_sAppName,
    dlgMain.m_sImageName,
    dlgMain.m_sEmailSubject, 
    dlgMain.m_sEmailTo, 
    dlgMain.m_sUrl,
    &dlgMain.m_uPriorities,
    dlgMain.m_sZipName,    
    dlgMain.m_pUDFiles)!=0)
    return 1; 
  
	if(dlgMain.Create(NULL) == NULL)
	{
		ATLTRACE(_T("Main dialog creation failed!\n"));
		return 0;
	}

	dlgMain.ShowWindow(nCmdShow);

	int nRet = theLoop.Run();

	_Module.RemoveMessageLoop();
	return nRet;
}
开发者ID:doo,项目名称:CrashRpt,代码行数:31,代码来源:CrashSender.cpp

示例15: Run

int Run(LPTSTR /*lpstrCmdLine*/ = NULL, int nCmdShow = 
#ifndef _WIN32_WCE
		SW_SHOWDEFAULT
#else // _WIN32_WCE
		SW_SHOWNORMAL
#endif // _WIN32_WCE
		)
{
	CMessageLoop theLoop;
	_Module.AddMessageLoop(&theLoop);

	CMainFrame wndMain;

	if(wndMain.CreateEx() == NULL)
	{
		ATLTRACE(_T("Main window creation failed!\n"));
		return 0;
	}

	wndMain.ShowWindow(nCmdShow);

	int nRet = theLoop.Run();

	_Module.RemoveMessageLoop();
	return nRet;
}
开发者ID:Nuos,项目名称:codeproject,代码行数:26,代码来源:BmpView.cpp


注:本文中的CAppModule::AddMessageLoop方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。