使用双窗口
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "loginForm.h"
|
||||
#include "loginForm.h"
|
||||
#include "mainForm.h"
|
||||
|
||||
LoginForm::LoginForm() :LayeredWindow(320, 448)
|
||||
{
|
||||
@@ -19,7 +20,10 @@ void LoginForm::OnNotify(Control* sender, EventArgs& args)
|
||||
UIString user = editUser->GetText();
|
||||
UIString pwd = editpwd->GetText();
|
||||
if (user == "718987717" && pwd == "123456") {
|
||||
::MessageBox(Hwnd(), L"登录成功!", L"提示", MB_OK);
|
||||
// 登录成功,跳转到主界面
|
||||
Hide(); // 隐藏登录窗口
|
||||
static MainForm mainForm;
|
||||
mainForm.Show(); // 显示主界面
|
||||
}
|
||||
else {
|
||||
::MessageBox(Hwnd(), L"用户名或密码错误!", L"提示", MB_OK);
|
||||
|
||||
Reference in New Issue
Block a user