Beispiel #1
0
void CLoginPreWnd::Notify(TNotifyUI& msg)
{
	if( msg.sType == _T("windowinit") ) 
	{
		OnPrepare(msg);
	}
	else if( msg.sType == _T("click") ) 
	{
		if( msg.pSender->GetName() == L"closebtn" ) 
		{
			Close();
			return; 
		}
		else if( msg.pSender->GetName() == L"EverAccountLoginBtn" ) 
		{ 
			Close();

			// 强制弹出更新窗口进行升级
			mainframe::MainFrame_GetWndService stGetWndService;
			login::g_LoginModule->GetModuleManager()->CallService(mainframe::SERVICE_VALUE_MAINFRAME_GET_MAINWND, 
				(param)&stGetWndService);

			CWindowWnd* pMainFrameWnd = reinterpret_cast<CWindowWnd*>(stGetWndService.pBaseWnd);
			ASSERT(pMainFrameWnd != NULL);

			CLoginFrameWnd* pLoginFrame = new CLoginFrameWnd();
			pLoginFrame->Create(pMainFrameWnd->GetHWND(), _T(""), 
				UI_WNDSTYLE_DIALOG, UI_WNDSTYLE_EX_DIALOG, 0, 0, 0, 0, NULL);
			pLoginFrame->CenterWindow();
/*
			pMainFrameWnd->ShowModal(*pLoginFrame);
*/
			return;
		}
		else if( msg.pSender->GetName() == L"EverAacountRegisterBtn" ) 
		{ 
		}
		else if( msg.pSender->GetName() == L"QQLogin" ) 
		{
			Close();

			// 强制弹出更新窗口进行升级
			mainframe::MainFrame_GetWndService stGetWndService;
			login::g_LoginModule->GetModuleManager()->CallService(mainframe::SERVICE_VALUE_MAINFRAME_GET_MAINWND, 
				(param)&stGetWndService);

			CWindowWnd* pMainFrameWnd = reinterpret_cast<CWindowWnd*>(stGetWndService.pBaseWnd);
			ASSERT(pMainFrameWnd != NULL);

			COAuthLoginWnd* pLoginFrame = new COAuthLoginWnd();
			pLoginFrame->Create(pMainFrameWnd->GetHWND(), _T(""), 
				UI_WNDSTYLE_DIALOG, UI_WNDSTYLE_EX_DIALOG, 0, 0, 0, 0, NULL);
			pLoginFrame->CenterWindow();
		}
	}
}