www.pudn.com > QQ2004_Source_0.01.rar > RegistryDlg.cpp


// RegistryDlg.cpp : implementation file 
// 
 
#include "stdafx.h" 
#include "QQClient.h" 
#include "RegistryDlg.h" 
 
#ifdef _DEBUG 
#define new DEBUG_NEW 
#undef THIS_FILE 
static char THIS_FILE[] = __FILE__; 
#endif 
 
///////////////////////////////////////////////////////////////////////////// 
// CRegistryDlg dialog 
 
 
CRegistryDlg::CRegistryDlg(CWnd* pParent /*=NULL*/) 
	: CDialog(CRegistryDlg::IDD, pParent) 
{ 
	//{{AFX_DATA_INIT(CRegistryDlg) 
	_userID = _T(""); 
	_password = _T(""); 
	_confirmPassowrd = _T(""); 
	_nickname = _T(""); 
	//}}AFX_DATA_INIT 
} 
 
 
void CRegistryDlg::DoDataExchange(CDataExchange* pDX) 
{ 
	CDialog::DoDataExchange(pDX); 
	//{{AFX_DATA_MAP(CRegistryDlg) 
	DDX_Text(pDX, IDC_EDIT_ACOUNT, _userID); 
	DDX_Text(pDX, IDC_EDIT_PASSWORD, _password); 
	DDV_MaxChars(pDX, _password, 8); 
	DDX_Text(pDX, IDC_EDIT_CONFIRM_PASSWORD, _confirmPassowrd); 
	DDX_Text(pDX, IDC_EDIT_NICKNAME, _nickname); 
	//}}AFX_DATA_MAP 
} 
 
 
BEGIN_MESSAGE_MAP(CRegistryDlg, CDialog) 
	//{{AFX_MSG_MAP(CRegistryDlg) 
		// NOTE: the ClassWizard will add message map macros here 
	//}}AFX_MSG_MAP 
END_MESSAGE_MAP() 
 
///////////////////////////////////////////////////////////////////////////// 
// CRegistryDlg message handlers 
 
void CRegistryDlg::OnOK() 
{ 
	// TODO: Add your control notification handler code here 
	UpdateData(TRUE); 
	if (_userID.IsEmpty()) 
	{ 
		AfxMessageBox("用户ID不能为空."); 
		return ; 
	} 
 
	if (_password.IsEmpty()) 
	{ 
		AfxMessageBox("密码不能为空."); 
		return ; 
	} 
 
	if (_nickname.IsEmpty()) 
	{ 
		AfxMessageBox("用户昵称不能为空."); 
		return ; 
	} 
 
	if (_password != _confirmPassowrd) 
	{ 
		AfxMessageBox("确认密码有错误."); 
		return ; 
	} 
 
	CDialog::OnOK(); 
}