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

📄 page3size.cpp

📁 精通MFC程序设计 第9章属性表与向导
💻 CPP
字号:
// Page3Size.cpp : implementation file
//

#include "stdafx.h"
#include "Chapter09A.h"
#include "Page3Size.h"
#include "FontSheet.h"
#include "MainFrm.h"

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

/////////////////////////////////////////////////////////////////////////////
// CPage3Size property page

IMPLEMENT_DYNCREATE(CPage3Size, CPropertyPage)

CPage3Size::CPage3Size() : CPropertyPage(CPage3Size::IDD)
{
	//{{AFX_DATA_INIT(CPage3Size)
	m_Height = 0;
	m_Width = 0;
	//}}AFX_DATA_INIT
}

CPage3Size::~CPage3Size()
{
}

void CPage3Size::DoDataExchange(CDataExchange* pDX)
{
	CPropertyPage::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CPage3Size)
	DDX_Text(pDX, IDC_FONT_HEIGHT, m_Height);
	DDX_Text(pDX, IDC_FONT_WIDTH, m_Width);
	//}}AFX_DATA_MAP
}


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

/////////////////////////////////////////////////////////////////////////////
// CPage3Size message handlers


BOOL CPage3Size::OnSetActive() 
{
	// TODO: Add your specialized code here and/or call the base class	
	CFontSheet* p=(CFontSheet*)GetParent();
	//对于最后一页,需要启用“完成”和“上一步”按钮
	p->SetWizardButtons(PSWIZB_FINISH|PSWIZB_BACK);
	return CPropertyPage::OnSetActive();
}

BOOL CPage3Size::OnWizardFinish() 
{
	// TODO: Add your specialized code here and/or call the base class
	UpdateData(TRUE);
	CMainFrame* pMFrm=(CMainFrame*)AfxGetMainWnd();
	//向视图类发送用户自定义消息
	pMFrm->GetActiveView()->SendMessage(WM_USER_APPLY);
	return CPropertyPage::OnWizardFinish();
}

⌨️ 快捷键说明

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