📄 page2.cpp
字号:
// Page2.cpp : implementation file
//
#include "stdafx.h"
#include "PSTest.h"
#include "Page2.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CPage2 property page
IMPLEMENT_DYNCREATE(CPage2, CPropertyPage)
CPage2::CPage2() : CPropertyPage(CPage2::IDD)
{
//{{AFX_DATA_INIT(CPage2)
//}}AFX_DATA_INIT
}
CPage2::~CPage2()
{
}
void CPage2::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CPage2)
DDX_Control(pDX, IDC_RADIO_MALE, m_Male);
DDX_Control(pDX, IDC_RADIO_FEMALE, m_Female);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CPage2, CPropertyPage)
//{{AFX_MSG_MAP(CPage2)
ON_BN_CLICKED(IDC_RADIO_FEMALE, OnRadioFemale)
ON_BN_CLICKED(IDC_RADIO_MALE, OnRadioMale)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CPage2 message handlers
BOOL CPage2::OnInitDialog()
{
CPropertyPage::OnInitDialog();
// TODO: Add extra initialization here
m_Male.SetCheck(1);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CPage2::OnRadioFemale()
{
// TODO: Add your control notification handler code here
SetModified();
}
void CPage2::OnRadioMale()
{
// TODO: Add your control notification handler code here
SetModified();
}
BOOL CPage2::OnApply()
{
// TODO: Add your specialized code here and/or call the base class
if(m_Male.GetCheck()==1)
{
m_Sex="男";
}
if(m_Female.GetCheck()==1)
{
m_Sex="女";
}
return CPropertyPage::OnApply();
}
BOOL CPage2::OnKillActive()
{
// TODO: Add your specialized code here and/or call the base class
if(m_Male.GetCheck()==1)
{
m_Sex="男";
}
if(m_Female.GetCheck()==1)
{
m_Sex="女";
}
SetModified(FALSE);
return CPropertyPage::OnKillActive();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -