本文整理汇总了C++中CFrameWnd::CenterWindow方法的典型用法代码示例。如果您正苦于以下问题:C++ CFrameWnd::CenterWindow方法的具体用法?C++ CFrameWnd::CenterWindow怎么用?C++ CFrameWnd::CenterWindow使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFrameWnd
的用法示例。
在下文中一共展示了CFrameWnd::CenterWindow方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: WinMain
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPSTR /*lpCmdLine*/, int nCmdShow)
{
CPaintManagerUI::SetInstance(hInstance);
CPaintManagerUI::SetResourcePath(CPaintManagerUI::GetInstancePath() + _T("skin\\FlashRes"));
HRESULT Hr = ::CoInitialize(NULL);
if( FAILED(Hr) ) return 0;
CFrameWnd* pFrame = new CFrameWnd();
if( pFrame == NULL ) return 0;
pFrame->Create(NULL, NULL, UI_WNDSTYLE_DIALOG, 0);
pFrame->CenterWindow();
pFrame->ShowWindow(true);
CPaintManagerUI::MessageLoop();
::CoUninitialize();
return 0;
}
示例2: _tWinMain
int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow)
{
::CoInitialize(NULL);
// xcopy /YEI "D:\work\DuiLib_Redrain\Lib\*.*" "D:\work\ONERadio\lib"
CPaintManagerUI::SetInstance(hInstance);
CPaintManagerUI::SetResourcePath(CPaintManagerUI::GetInstancePath() + _T("skin"));
//CPaintManagerUI::SetResourcePath(L"skin");
CFrameWnd *pFrame = new CFrameWnd(_T("Main_dlg.xml"));
pFrame->Create(NULL, _T("HiDPI Demo Window1"), UI_WNDSTYLE_FRAME, WS_EX_WINDOWEDGE);
pFrame->ShowWindow();
pFrame->setDPI(CDPI::GetMainMonitorDPI());
pFrame->CenterWindow();
CFrameWnd *pFrame1 = new CFrameWnd(_T("Main_dlg2.xml"));
pFrame1->Create(NULL, _T("HiDPI Demo Window2"), UI_WNDSTYLE_FRAME, WS_EX_WINDOWEDGE);
pFrame1->ShowWindow();
::ShowWindow(*pFrame1, SW_HIDE);
CPaintManagerUI::MessageLoop();
delete pFrame;
delete pFrame1;
::CoUninitialize();
return 0;
}