【VC开源代码栏目提醒】:网学会员在VC开源代码频道为大家收集整理了Wizrd1.cpp提供大家参考,希望对大家有所帮助!
// Wizrd1.cpp : implementation file
//
#include "stdafx.h"
#include "CWizard.h"
#include "Wizrd1.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CWizrd1 property page
IMPLEMENT_DYNCREATE(CWizrd1, CPropertyPage)
CWizrd1::CWizrd1() : CPropertyPage(CWizrd1::IDD)
{
//{{AFX_DATA_INIT(CWizrd1)
m_sex = -1;
m_name = _T("");
//}}AFX_DATA_INIT
}
CWizrd1::~CWizrd1()
{
}
void CWizrd1::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CWizrd1)
DDX_Radio(pDX, IDC_RADIO1, m_sex);
DDX_Text(pDX, IDC_EDIT1, m_name);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CWizrd1, CPropertyPage)
//{{AFX_MSG_MAP(CWizrd1)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CWizrd1 message handlers
BOOL CWizrd1::OnSetActive()
{
// TODO: Add your specialized code here and/or call the base class
((CPropertySheet*)GetParent())->SetWizardButtons(PSWIZB_NEXT);
return CPropertyPage::OnSetActive();
}
BOOL CWizrd1::OnInitDialog()
{
CPropertyPage::OnInitDialog();
// TODO: Add extra initialization here
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
LRESULT CWizrd1::OnWizardNext()
{
// TODO: Add your specialized code here and/or call the base class
UpdateData(TRUE);
if((-1==m_sex)|| (_T("")==m_name))
{
MessageBox("请填写相应的内容!");
return -1;
}
else
return CPropertyPage::OnWizardNext();
}