本文整理汇总了C++中MainDialog::CenterWindow方法的典型用法代码示例。如果您正苦于以下问题:C++ MainDialog::CenterWindow方法的具体用法?C++ MainDialog::CenterWindow怎么用?C++ MainDialog::CenterWindow使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MainDialog
的用法示例。
在下文中一共展示了MainDialog::CenterWindow方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: _tWinMain
int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPTSTR /*lpCmdLine*/, int nCmdShow)
{
CPaintManagerUI::SetInstance(hInstance);
CWndShadow::Initialize(hInstance);
CPaintManagerUI::SetResourcePath(CPaintManagerUI::GetInstancePath() + _T("\\FileTree\\"));
//CPaintManagerUI::SetResourceZip(_T("Control.zip"),true);
HRESULT Hr = ::CoInitialize(NULL);
if( FAILED(Hr) ) return 0;
MainDialog* pFrame = new MainDialog();
if( pFrame == NULL )
return 0;
pFrame->Create(NULL, _T("TokenControl"),
UI_WNDSTYLE_FRAME,
UI_WNDSTYLE_EX_FRAME, 0, 0, 300, 500);
pFrame->CenterWindow();
::ShowWindow(*pFrame, SW_SHOW);
CPaintManagerUI::MessageLoop();
::CoUninitialize();
return 0;
}
示例2: OnClick
//.........这里部分代码省略.........
param.bgimage = szBuf;
}
skin_changed_observer_.Broadcast(param);
}
}
else if (_tcsicmp(msg.pSender->GetName(), kChangeColorSkinControlName) == 0)
{
CDuiRect rcWindow;
GetWindowRect(m_hWnd, &rcWindow);
rcWindow.top = rcWindow.top + msg.pSender->GetPos().bottom;
new ColorSkinWindow(this, rcWindow);
}
else if (0 == _tcsicmp(msg.pSender->GetName(), _T("phone")))
{
logic::GetLogic()->asynNotifyObserver(module::KEY_LOGIN_USERID,10);
}
else if (0 == _tcsicmp(msg.pSender->GetName(), _T("QQpalycenter")))
{
logic::GetLogic()->removeObserver(this);
}
else if (0 == _tcsicmp(msg.pSender->GetName(), _T("MainMenu")))
{
CMenuWnd* pMenu = new CMenuWnd(m_hWnd);
DuiLib::CPoint point = msg.ptMouse;
ClientToScreen(m_hWnd, &point);
STRINGorID xml(_T("menutest.xml"));
pMenu->Init(NULL, xml, _T("xml"), point);
}
else if (0 == _tcsicmp(msg.pSender->GetName(), _T("ToolsBtn")))//设置按钮
{
MakeGroupWnd* pFrame = new MakeGroupWnd();
if (pFrame == NULL) return;
pFrame->Create(NULL, _T("MakeGroupWnd"), UI_WNDSTYLE_FRAME, WS_EX_STATICEDGE | WS_EX_APPWINDOW, 0, 0, 600, 800);
pFrame->CenterWindow();
pFrame->ShowWindow(true);
}
else if (0 == _tcsicmp(msg.pSender->GetName(), _T("QQSafeBtn")))//安全中心
{
}
else if (0 == _tcsicmp(msg.pSender->GetName(), _T("messageCenterBtn")))//消息中心
{
FloatWnd* pFloatWnd = new FloatWnd();
if (pFloatWnd == NULL) return;
pFloatWnd->Create(m_hWnd, _T("FloatWnd"), UI_WNDSTYLE_FRAME|WS_THICKFRAME, WS_EX_TOOLWINDOW | WS_EX_TOPMOST| WS_EX_STATICEDGE, 0, 0, 0, 0);
//pFloatWnd->ShowWindow(true);
pFloatWnd->BringToTop();
}
else if (0 == _tcsicmp(msg.pSender->GetName(), _T("QzoneBtn")))
{
}
else if (0 == _tcsicmp(msg.pSender->GetName(), _T("QQTradeCenterBtn")))
{
int n = 0;
n++;
}
else if (0 == _tcsicmp(msg.pSender->GetName(), _T("paipaiBtn")))
{
int n = 0;
n++;
}
else if (0 == _tcsicmp(msg.pSender->GetName(), _T("PaiPaiChongzhiBtn")))
{
int n = 0;
n++;
}
else if (0 == _tcsicmp(msg.pSender->GetName(), _T("addBtn")))
{
int n = 0;
n++;
}
else if (0 == _tcsicmp(msg.pSender->GetName(), _T("friend_circleBtn")))
{
LoginWnd* pLoginWnd = new LoginWnd();
if (pLoginWnd == NULL) return;
pLoginWnd->Create(NULL, _T("LoginWnd"), /*WS_POPUP | WS_VISIBLE | WS_CLIPSIBLINGS*/UI_WNDSTYLE_FRAME | WS_POPUP, 0/*WS_EX_LAYERED*/, 0, 0, 0, 0);
pLoginWnd->CenterWindow();
pLoginWnd->ShowWindow(true);
}
else if (0 == _tcsicmp(msg.pSender->GetName(), _T("mailBtn")))
{
MainDialog* pMainDialog = new MainDialog();
if (pMainDialog == NULL) return;
pMainDialog->Create(NULL, _T("MainDialog"), UI_WNDSTYLE_FRAME | WS_POPUP, 0, 0, 0, 0, 0);
pMainDialog->CenterWindow();
pMainDialog->ShowWindow(true);
}
else if (0 == _tcsicmp(msg.pSender->GetName(), _T("XiaoYouBtn")))
{
int n = 0;
n++;
}
else if (0 == _tcsicmp(msg.pSender->GetName(), _T("sosoBtn")))
{
int n = 0;
n++;
}
}