int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPTSTR lpCmdLine, int nCmdShow) #endif { CPaintManagerUI::SetInstance(hInstance); #if defined(WIN32) && !defined(UNDER_CE) HRESULT Hr = ::CoInitialize(NULL); #else HRESULT Hr = ::CoInitializeEx(NULL, COINIT_MULTITHREADED); #endif if( FAILED(Hr) ) return 0; MainFrame* pFrame = new MainFrame(); if( pFrame == NULL ) return 0; #if defined(WIN32) && !defined(UNDER_CE) pFrame->Create(NULL, _T("Çý¶¯Ð¶ÔسÌÐò"), UI_WNDSTYLE_FRAME, WS_EX_STATICEDGE | WS_EX_APPWINDOW, 0, 0, 600, 800); #else pFrame->Create(NULL, _T("Çý¶¯Ð¶ÔسÌÐò"), UI_WNDSTYLE_FRAME, WS_EX_TOPMOST, 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN)); #endif pFrame->CenterWindow(); ::ShowWindow(*pFrame, SW_SHOW); CPaintManagerUI::MessageLoop(); return 0; }
int APIENTRY _tWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ LPTSTR lpCmdLine, _In_ int nCmdShow) { UNREFERENCED_PARAMETER(hPrevInstance); UNREFERENCED_PARAMETER(lpCmdLine); CPaintManagerUI::SetInstance(hInstance); CPaintManagerUI::SetResourcePath(CPaintManagerUI::GetInstancePath()); HINSTANCE hInstRich = ::LoadLibrary(_T("Riched20.dll")); ::CoInitialize(NULL); ::OleInitialize(NULL); _Module.Init( 0, hInstance ); #if defined(WIN32) && !defined(UNDER_CE) HRESULT Hr = ::CoInitialize(NULL); #else HRESULT Hr = ::CoInitializeEx(NULL, COINIT_MULTITHREADED); #endif if( FAILED(Hr) ) return 0; MainFrame* pFrame = new MainFrame(); if( pFrame == NULL ) return 0; #if defined(WIN32) && !defined(UNDER_CE) pFrame->Create(NULL, _T("QQ2011"), UI_WNDSTYLE_FRAME, WS_EX_STATICEDGE | WS_EX_APPWINDOW, 0, 0, 600, 800); #else pFrame->Create(NULL, _T("QQ2011"), UI_WNDSTYLE_FRAME, WS_EX_TOPMOST, 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN)); #endif pFrame->CenterWindow(); ::ShowWindow(*pFrame, SW_SHOW); CPaintManagerUI::MessageLoop(); CPaintManagerUI::Term(); _Module.Term(); ::OleUninitialize(); ::CoUninitialize(); ::FreeLibrary(hInstRich); return 0; }
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPTSTR lpCmdLine, int nCmdShow) #endif { CPaintManagerUI::SetInstance(hInstance); CPaintManagerUI::SetResourcePath(CPaintManagerUI::GetInstancePath()); HINSTANCE hInstRich = ::LoadLibrary(_T("Riched20.dll")); ::CoInitialize(NULL); ::OleInitialize(NULL); _Module.Init( 0, hInstance ); #if defined(WIN32) && !defined(UNDER_CE) HRESULT Hr = ::CoInitialize(NULL); #else HRESULT Hr = ::CoInitializeEx(NULL, COINIT_MULTITHREADED); #endif if( FAILED(Hr) ) return 0; MainFrame* pFrame = new MainFrame(); if( pFrame == NULL ) return 0; if (!pFrame->LoadConfigXml(_T("Startup.xml"))) return -1; #if defined(WIN32) && !defined(UNDER_CE) pFrame->Create(NULL, _T("遥感处理工具集"), UI_WNDSTYLE_FRAME, WS_EX_STATICEDGE | WS_EX_APPWINDOW, 0, 0, 600, 800); #else pFrame->Create(NULL, _T("遥感处理工具集"), UI_WNDSTYLE_FRAME, WS_EX_TOPMOST, 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN)); #endif pFrame->CenterWindow(); ::ShowWindow(*pFrame, SW_SHOW); CPaintManagerUI::MessageLoop(); CPaintManagerUI::Term(); _Module.Term(); WindowImplBase::Cleanup(); ::OleUninitialize(); ::CoUninitialize(); ::FreeLibrary(hInstRich); return 0; }
int WINAPI _tWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ LPTSTR lpCmdLine, _In_ int nShowCmd) { HRESULT Hr = ::CoInitialize(NULL); if (FAILED(Hr)) return 0; CPaintManagerUI::SetInstance(hInstance); CPaintManagerUI::SetResourcePath(CPaintManagerUI::GetInstancePath() + _T("skin\\hitools\\")); MainFrame* pMainFrame = new MainFrame; if (pMainFrame == NULL) return 0; pMainFrame->Create(NULL, NULL, UI_WNDSTYLE_DIALOG, 0); pMainFrame->CenterWindow(); pMainFrame->ShowWindow(true); CPaintManagerUI::MessageLoop(); ::CoUninitialize(); return 0; }