shapeppage.cpp

来自「< MFC经典问答>>是微软类库经常遇到的问题」· C++ 代码 · 共 57 行

CPP
57
字号
// ShapePPage.cpp : implementation file
//

#include "stdafx.h"
#include "SetActivePage.h"

#include "ShapePPage.h"

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

/////////////////////////////////////////////////////////////////////////////
// CShapePPage property page

IMPLEMENT_DYNCREATE(CShapePPage, CPropertyPage)

CShapePPage::CShapePPage() : CPropertyPage(CShapePPage::IDD)
{
	//{{AFX_DATA_INIT(CShapePPage)
	m_nShape = -1;
	//}}AFX_DATA_INIT
}

CShapePPage::~CShapePPage()
{
}

void CShapePPage::DoDataExchange(CDataExchange* pDX)
{
	CPropertyPage::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CShapePPage)
	DDX_CBIndex(pDX, IDC_SHAPE, m_nShape);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CShapePPage, CPropertyPage)
	//{{AFX_MSG_MAP(CShapePPage)
	ON_BN_CLICKED(IDC_GOTO_COORDS, OnGotoCoords)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CShapePPage message handlers

void CShapePPage::OnGotoCoords() 
{
	CPropertySheet* pParent = DYNAMIC_DOWNCAST( CPropertySheet, GetParent() );
	if( pParent )
	{
		pParent->SetActivePage( 0 );	// 1st page
	}
}

⌨️ 快捷键说明

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