www.pudn.com > VisualC6.0.rar > FontPage.cpp, change:2007-08-02,size:2328b
// FontPage.cpp : implementation file
//
#include "stdafx.h"
#include "TabDlgDemo.h"
#include "FontPage.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CFontPage property page
IMPLEMENT_DYNCREATE(CFontPage, CPropertyPage)
CFontPage::CFontPage() : CPropertyPage(CFontPage::IDD)
{
//{{AFX_DATA_INIT(CFontPage)
m_height = 0;
m_radio = 0;
//}}AFX_DATA_INIT
}
CFontPage::~CFontPage()
{
}
void CFontPage::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CFontPage)
DDX_Text(pDX, IDC_EDIT1, m_height);
DDX_Radio(pDX, IDC_RADIO1, m_radio);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CFontPage, CPropertyPage)
//{{AFX_MSG_MAP(CFontPage)
ON_BN_CLICKED(IDC_RADIO1, OnRadio1)
ON_BN_CLICKED(IDC_RADIO2, OnRadio2)
ON_BN_CLICKED(IDC_RADIO3, OnRadio3)
ON_BN_CLICKED(IDC_RADIO4, OnRadio4)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CFontPage message handlers
void CFontPage::OnRadio1()
{
// TODO: Add your control notification handler code here
SetModified();//激活应用按钮
m_radio=0;
GetDlgItem(IDC_EDIT1)->EnableWindow(false); //编辑框禁止输入
}
void CFontPage::OnRadio2()
{
// TODO: Add your control notification handler code here
SetModified();//激活应用按钮
m_radio=1;
GetDlgItem(IDC_EDIT1)->EnableWindow(false); //编辑框禁止输入
}
void CFontPage::OnRadio3()
{
// TODO: Add your control notification handler code here
SetModified();//激活应用按钮
m_radio=2;
GetDlgItem(IDC_EDIT1)->EnableWindow(false); //编辑框禁止输入
}
void CFontPage::OnRadio4()
{
// TODO: Add your control notification handler code here
SetModified();//激活应用按钮
m_radio=3;
GetDlgItem(IDC_EDIT1)->EnableWindow(true); //编辑框允许输入
}
BOOL CFontPage::OnInitDialog()
{
CPropertyPage::OnInitDialog();
// TODO: Add extra initialization here
GetDlgItem(IDC_EDIT1)->EnableWindow(false); //编辑框禁止输入
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}