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

📄 userpage1.cpp

📁 数据库课件。适用于培训、教学。PPT格式。
💻 CPP
字号:
// UserPage1.cpp : implementation file
//

#include "stdafx.h"
#include "AdoAdrBook.h"
#include "UserPage1.h"

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

/////////////////////////////////////////////////////////////////////////////
// CUserPage1 property page

IMPLEMENT_DYNCREATE(CUserPage1, CPropertyPage)

CUserPage1::CUserPage1() : CPropertyPage(CUserPage1::IDD)
{
	//{{AFX_DATA_INIT(CUserPage1)
	m_address = _T("");
	m_email = _T("");
	m_homePhone = _T("");
	m_mobilePhone = _T("");
	m_name = _T("");
	m_workPhone = _T("");
	//}}AFX_DATA_INIT
}

CUserPage1::~CUserPage1()
{
}

void CUserPage1::DoDataExchange(CDataExchange* pDX)
{
	CPropertyPage::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CUserPage1)
	DDX_Text(pDX, IDC_ADDRESS, m_address);
	DDX_Text(pDX, IDC_EMAIL, m_email);
	DDX_Text(pDX, IDC_HOMEPHONE, m_homePhone);
	DDX_Text(pDX, IDC_MOBILEPHONE, m_mobilePhone);
	DDX_Text(pDX, IDC_NAME, m_name);
	DDX_Text(pDX, IDC_WORKPHONE, m_workPhone);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CUserPage1, CPropertyPage)
	//{{AFX_MSG_MAP(CUserPage1)
		// NOTE: the ClassWizard will add message map macros here
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CUserPage1 message handlers

BOOL CUserPage1::OnKillActive() 
{
	// TODO: Add your specialized code here and/or call the base class
	UpdateData(TRUE);
    if(m_name.IsEmpty())
	{
		AfxMessageBox("姓名不能不能空");
		return FALSE ;
	}
	else 
		return TRUE;
	//return CPropertyPage::OnKillActive();
}

⌨️ 快捷键说明

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