本文整理汇总了C++中MainFrame::CenterWindow方法的典型用法代码示例。如果您正苦于以下问题:C++ MainFrame::CenterWindow方法的具体用法?C++ MainFrame::CenterWindow怎么用?C++ MainFrame::CenterWindow使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MainFrame
的用法示例。
在下文中一共展示了MainFrame::CenterWindow方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: WinMain
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;
}
示例2: _tWinMain
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;
}
示例3: WinMain
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;
}
示例4: _tWinMain
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;
}