Prop2.cpp
资源名称:Prop.rar [点击查看]
上传用户:peony_8
上传日期:2022-05-18
资源大小:1955k
文件大小:2k
源码类别:
菜单
开发平台:
Visual C++
- // Prop2.cpp : implementation file
- //
- #include "stdafx.h"
- #include "Prop.h"
- #include "Prop2.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CProp2 property page
- IMPLEMENT_DYNCREATE(CProp2, CPropertyPage)
- CProp2::CProp2() : CPropertyPage(CProp2::IDD)
- {
- //{{AFX_DATA_INIT(CProp2)
- m_football = FALSE;
- m_basketball = FALSE;
- m_volleyball = FALSE;
- m_swim = FALSE;
- //}}AFX_DATA_INIT
- }
- CProp2::~CProp2()
- {
- }
- void CProp2::DoDataExchange(CDataExchange* pDX)
- {
- CPropertyPage::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CProp2)
- DDX_Check(pDX, IDC_CHECK1, m_football);
- DDX_Check(pDX, IDC_CHECK2, m_basketball);
- DDX_Check(pDX, IDC_CHECK3, m_volleyball);
- DDX_Check(pDX, IDC_CHECK4, m_swim);
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(CProp2, CPropertyPage)
- //{{AFX_MSG_MAP(CProp2)
- // NOTE: the ClassWizard will add message map macros here
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CProp2 message handlers
- BOOL CProp2::OnSetActive()
- {
- // TODO: Add your specialized code here and/or call the base class
- ((CPropertySheet*)GetParent())->SetWizardButtons(PSWIZB_BACK | PSWIZB_NEXT);
- return CPropertyPage::OnSetActive();
- }
- LRESULT CProp2::OnWizardNext()
- {
- // TODO: Add your specialized code here and/or call the base class
- UpdateData();//控件和成员变量关联之后,如果需要取值或将所关联的成员变量的值传给控件,一定要调用UpdateData来更新数据
- if(m_football || m_basketball || m_volleyball || m_swim)
- {
- return CPropertyPage::OnWizardNext();//进入到下一个页面
- }
- else
- {
- MessageBox("请选择你的兴趣爱好!");
- return -1;
- }
- }