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

📄 demopsheet.cpp

📁 这是MFC经典问答书的光盘内容
💻 CPP
字号:
// DemoPSheet.cpp : implementation file
//

#include "stdafx.h"
#include "ApplyButton.h"

#include "DemoPSheet.h"
#include "DrawDoc.h"

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

/////////////////////////////////////////////////////////////////////////////
// CDemoPSheet

IMPLEMENT_DYNAMIC(CDemoPSheet, CPropertySheet)

CDemoPSheet::CDemoPSheet(CDrawDoc* pDoc, CWnd* pParentWnd, UINT iSelectPage)
	:CPropertySheet(IDS_PSHEET_CAPTION, pParentWnd, iSelectPage)
{
	ASSERT_VALID( pDoc );
	m_pDoc = pDoc;

	AddPage( &m_CoordsPPage );	// First page
	AddPage( &m_ShapePPage );	// Second page
}

CDemoPSheet::~CDemoPSheet()
{
}


BEGIN_MESSAGE_MAP(CDemoPSheet, CPropertySheet)
	//{{AFX_MSG_MAP(CDemoPSheet)
	ON_BN_CLICKED(ID_APPLY_NOW, OnApplyNow)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDemoPSheet message handlers

void CDemoPSheet::OnApplyNow() 
{
	// 1 - Update data for the active property page
	GetActivePage()->UpdateData( TRUE );

	// 2 - Notify document of the user's click
	m_pDoc->OnApply( this );

	// 3 - Reset the "modified" flag for each property page
	for( int i = 0; i < GetPageCount(); ++i )
	{
		GetPage( i )->SetModified( FALSE );
	}
}

⌨️ 快捷键说明

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