本文整理汇总了C++中CAppModule::RemoveMessageLoop方法的典型用法代码示例。如果您正苦于以下问题:C++ CAppModule::RemoveMessageLoop方法的具体用法?C++ CAppModule::RemoveMessageLoop怎么用?C++ CAppModule::RemoveMessageLoop使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CAppModule
的用法示例。
在下文中一共展示了CAppModule::RemoveMessageLoop方法的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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例6: 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;
}
示例7: Run
int Run(LPTSTR /*lpstrCmdLine*/ = NULL, int /*nCmdShow*/ = SW_SHOWDEFAULT)
{
// Check window mirroring settings
CString sRTL = Utility::GetINIString(_T("Settings"), _T("RTLReading"));
if(sRTL.CompareNoCase(_T("1"))==0)
{
SetProcessDefaultLayout(LAYOUT_RTL);
}
CMessageLoop theLoop;
_Module.AddMessageLoop(&theLoop);
int nGetCrashInfoThroughPipe = GetCrashInfoThroughPipe();
if(nGetCrashInfoThroughPipe!=0)
{
ATLASSERT(nGetCrashInfoThroughPipe==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;
}
示例8: Run
int Run(LPTSTR /*lpstrCmdLine*/ = NULL, int nCmdShow = SW_SHOWDEFAULT)
{
CProxy proxy;
proxy.OpenProxyPort(CSettings::s_proxyPort);
CMessageLoop theLoop;
_Module.AddMessageLoop(&theLoop);
CMainDlg dlgMain(&proxy);
if(dlgMain.Create(NULL) == NULL)
{
ATLTRACE(_T("Main dialog creation failed!\n"));
return 0;
}
//dlgMain.ShowWindow(nCmdShow);
int nRet = theLoop.Run();
_Module.RemoveMessageLoop();
proxy.CloseProxyPort();
return nRet;
}
示例9: 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;
}
示例10: Run
int Run(LPTSTR /*lpstrCmdLine*/ = NULL, int nCmdShow = SW_SHOWDEFAULT)
{
CMessageLoop theLoop;
_Module.AddMessageLoop(&theLoop);
BkString::Load(IDR_STRING_DEF); // ╪стьвж╥Ш╢╝
BkSkin::LoadSkins(IDR_SKIN_DEF); // ╪стьф╓╥Т
BkStyle::LoadStyles(IDR_STYLE_DEF); // ╪сть╥Г╦Я
CMainDlg dlgMain;
if(dlgMain.Create(NULL) == NULL)
{
DWORD dwErr = GetLastError();
ATLTRACE(_T("Main dialog creation failed!\n"));
return 0;
}
dlgMain.ShowWindow(nCmdShow);
int nRet = theLoop.Run();
_Module.RemoveMessageLoop();
return nRet;
}
示例11: 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;
}
示例12: Run
int Run(LPTSTR /*lpstrCmdLine*/= NULL, int nCmdShow = SW_SHOWDEFAULT) {
CMessageLoop theLoop;
_Module.AddMessageLoop(&theLoop);
// Get command line params
const wchar_t* szCommandLine = GetCommandLineW();
int argc = 0;
LPWSTR* argv = CommandLineToArgvW(szCommandLine, &argc);
CMainDlg dlgMain;
if (argc == 2 && wcscmp(argv[1], L"/restart") == 0)
dlgMain.m_bRestarted = TRUE;
else
dlgMain.m_bRestarted = FALSE;
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;
}
示例13: 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;
}
示例14: Run
int Run(LPTSTR /*lpstrCmdLine*/ = NULL, int nCmdShow = SW_SHOWDEFAULT)
{
int nRet = 0;
FUNCTION_BLOCK_INIT();
{
FUNCTION_BLOCK_TRACE(0);
CMessageLoop theLoop;
_Module.AddMessageLoop(&theLoop);
CMainFrame wndMain;
if(wndMain.CreateEx() == NULL)
{
ATLTRACE(_T("Main window creation failed!\n"));
return 0;
}
wndMain.ShowWindow(nCmdShow);
nRet = theLoop.Run();
_Module.RemoveMessageLoop();
}
FUNCTION_BLOCK_UNINIT();
return nRet;
}
示例15: _tWinMain
int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPTSTR /*lpstrCmdLine*/, int /*nCmdShow*/)
{
HRESULT hRes = ::CoInitialize(NULL);
// If you are running on NT 4.0 or higher you can use the following call instead to
// make the EXE free threaded. This means that calls come in on a random RPC thread.
// HRESULT hRes = ::CoInitializeEx(NULL, COINIT_MULTITHREADED);
ATLASSERT(SUCCEEDED(hRes));
// this resolves ATL window thunking problem when Microsoft Layer for Unicode (MSLU) is used
//::DefWindowProc(NULL, 0, 0, 0L);
AtlInitCommonControls(ICC_BAR_CLASSES); // add flags to support other controls
hRes = _Module.Init(NULL, hInstance);
ATLASSERT(SUCCEEDED(hRes));
CMessageLoop theLoop;
CMessageFilter * filter = new CMouseWheelFilter();
theLoop.AddMessageFilter(filter);
_Module.AddMessageLoop(&theLoop);
CMainDlg dlgMain;
dlgMain.Create(NULL);
dlgMain.ShowWindow(SW_NORMAL);
int nRet = theLoop.Run();
delete filter;
_Module.RemoveMessageLoop();
//_Module.Term();
::CoUninitialize();
return nRet;
}