⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dlglogin.cpp

📁 一个类似与浩方的战网平台源代码
💻 CPP
字号:
// DlgLogin.cpp : implementation file
//

#include "stdafx.h"
#include "LinKGameEx.h"
#include "LinKGameExDlg.h"
#include "DlgLogin.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CDlgLogin dialog


CDlgLogin::CDlgLogin(CWnd* pParent /*=NULL*/)
	: CDialog(CDlgLogin::IDD, pParent)
{
	//{{AFX_DATA_INIT(CDlgLogin)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void CDlgLogin::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CDlgLogin)
	DDX_Control(pDX, IDC_TXTPWD, m_TxtPWD);
	DDX_Control(pDX, IDC_CMBNAME, m_CmbName);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CDlgLogin, CDialog)
	//{{AFX_MSG_MAP(CDlgLogin)
	ON_BN_CLICKED(IDC_BTNREG, OnBtnreg)
	ON_BN_CLICKED(IDC_BTNFINDPWD, OnBtnfindpwd)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDlgLogin message handlers

void CDlgLogin::OnBtnreg() 
{
	// TODO: Add your control notification handler code here
	EndDialog(0);
}

void CDlgLogin::OnBtnfindpwd() 
{
	// TODO: Add your control notification handler code here
	EndDialog(1);
}

void CDlgLogin::OnOK() 
{
	// TODO: Add extra validation here
	if( this->m_CmbName.GetWindowTextLength() <= 0)	
	{
		MessageBox( "请填写名称", "邻客提示...", MB_OK);
		return;
	}
	if( this->m_TxtPWD.GetWindowTextLength() <= 0)
	{
		MessageBox( "请填写密码", "邻客提示...", 0);
		return;
	}
	this->m_CmbName.GetWindowText(((CLinKGameExDlg*)theApp.m_pMainWnd)->m_UserName);
	this->m_TxtPWD.GetWindowText(((CLinKGameExDlg*)theApp.m_pMainWnd)->m_UserPWD);
	EndDialog(2);
}

void CDlgLogin::OnCancel() 
{
	// TODO: Add extra cleanup here	
	//if(((CLinKGameExDlg*)theApp.m_pMainWnd)->m_hWnd != NULL)
	//((CLinKGameExDlg*)theApp.m_pMainWnd)->DestroyWindow();
	EndDialog(3);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -