void GameLoginDlg::OnBtnLogin() { ShowWindow(SW_HIDE); GameMainDlg dlg; dlg.DoModal(); OnClose(); }
LRESULT GameLoginDlg::OnLoginResult(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { if (uMsg == msg_login_result) { switch (wParam) { case 1: { ShowWindow(SW_HIDE); GameCreateRoleDlg dlg; dlg.DoModal(); GameMainDlg dlgMain; dlgMain.DoModal(); OnClose(); } break; case 2: { _DisposeLoginErr(lParam); } break; default: break; } } return TRUE; }