int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPSTR /*lpCmdLine*/, int nCmdShow) { EnableMemLeakCheck(); CPaintManagerUI::SetInstance(hInstance); GdiplusStartupInput gdiplusStartupInput; ULONG_PTR gdiplusToken; GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL); HRESULT Hr = ::CoInitialize(NULL); if( FAILED(Hr) ) return 0; if( ::LoadLibrary(_T("d3d9.dll")) == NULL ) ::MessageBox(NULL, _T("加载 d3d9.dll 失败,一些特效可能无法显示!"), _T("信息提示"),MB_OK|MB_ICONWARNING); CMainWnd* pFrame = new CMainWnd(); if(pFrame == NULL) return 0; pFrame->Create(NULL,_T("UiLib Demos"), UI_WNDSTYLE_FRAME, 0L, 0, 0, 900, 600); pFrame->CenterWindow(); ::ShowWindow(*pFrame, SW_SHOW); CPaintManagerUI::MessageLoop(); ::CoUninitialize(); GdiplusShutdown(gdiplusToken); _CrtDumpMemoryLeaks(); return 0; }
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPSTR /*lpCmdLine*/, int nCmdShow) { HRESULT Hr = ::CoInitialize(NULL); if( FAILED(Hr) ) return 0; HRESULT hRes = ::OleInitialize(NULL); // 初始化UI管理器 CPaintManagerUI::SetInstance(hInstance); // 初始化资源 InitResource(); ::SetCurrentDirectory(CPaintManagerUI::GetInstancePath()); #ifndef _DEBUG CPaintManagerUI::LoadPlugin(_T("TroyControls.dll")); #else CPaintManagerUI::LoadPlugin(_T("TroyControls_d.dll")); #endif CMainWnd* pFrame = new CMainWnd(); if( pFrame == NULL ) return 0; pFrame->Create(NULL, _T("TroyBrowser"), UI_WNDSTYLE_FRAME, 0L, 0, 0, 990,690); pFrame->CenterWindow(); pFrame->ShowModal(); CPaintManagerUI::MessageLoop(); OleUninitialize(); ::CoUninitialize(); return 0; }
int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { EnableMemLeakCheck(); CWangDianNiu_DLL::InitConsoleWindow(); HRESULT Hr = ::CoInitialize(NULL); if( FAILED(Hr) ) return 0; CWkeWebkitUI::WkeWebkit_Init(); CPaintManagerUI::SetInstance(hInstance); //DuiLib::CDuiString instancePath = CPaintManagerUI::GetInstancePath(); //instancePath += "Skin\\"; //CPaintManagerUI::SetResourcePath(instancePath); CMainWnd* pFrame = new CMainWnd(); if(pFrame == NULL) return 0; pFrame->Create(NULL,_T("ÍúµêÅ£"), UI_WNDSTYLE_FRAME, 0L, 0, 0, 1120, 600); pFrame->CenterWindow(); ::ShowWindow(*pFrame, SW_SHOW); CPaintManagerUI::MessageLoop(); CWkeWebkitUI::WkeWebkit_Shutdown(); ::CoUninitialize(); CWangDianNiu_DLL::FreeConsoleWindow(); _CrtDumpMemoryLeaks(); return 0; }
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPSTR /*lpCmdLine*/, int nCmdShow) { CPaintManagerUI::SetInstance(hInstance); HRESULT Hr = ::CoInitialize(NULL); if( FAILED(Hr) ) return 0; CMainWnd* pFrame = new CMainWnd(); if( pFrame == NULL ) return 0; pFrame->Create(NULL, _T("я╦ювсно╥╨пвс"), UI_WNDSTYLE_FRAME, 0L, 0, 0, 990,690); pFrame->CenterWindow(); CPaintManagerUI::MessageLoop(); ::CoUninitialize(); return 0; }
int APIENTRY _tWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ LPTSTR lpCmdLine, _In_ int nCmdShow) { ::CoInitialize(NULL); CPaintManagerUI::SetInstance(hInstance);// 加载XML的时候,需要使用该句柄去定位EXE的路径,才能加载XML的路径 窗口实例句柄 CMainWnd *pMainWnd = new CMainWnd; pMainWnd->Create(NULL, L"WeChatMain", UI_WNDSTYLE_FRAME, WS_EX_WINDOWEDGE); pMainWnd->CenterWindow(); pMainWnd->ShowWindow(); CPaintManagerUI::MessageLoop(); delete pMainWnd; ::CoInitialize(NULL); return 0; }
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPSTR /*lpCmdLine*/, int nCmdShow) { Poco::NamedMutex unique("SRTool"); if (!unique.tryLock()) return 0; CPaintManagerUI::SetInstance(hInstance); CPaintManagerUI::SetResourcePath(CPaintManagerUI::GetInstancePath() + _T("skin")); HRESULT Hr = ::CoInitialize(NULL); if (FAILED(Hr)) return 0; CMainWnd Frame; Frame.Create(NULL, NULL, UI_WNDSTYLE_DIALOG, WS_EX_WINDOWEDGE | WS_EX_ACCEPTFILES); Frame.SetIcon(IDI_ICON1); Frame.CenterWindow(); Frame.ShowWindow(true); CPaintManagerUI::MessageLoop(); ::CoUninitialize(); return 0; }