squiggleppg.cpp

来自「学习VC的一些例子」· C++ 代码 · 共 82 行

CPP
82
字号
// SquigglePpg.cpp : Implementation of the CSquigglePropPage property page class.

#include "stdafx.h"
#include "Squiggle.h"
#include "SquigglePpg.h"

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


IMPLEMENT_DYNCREATE(CSquigglePropPage, COlePropertyPage)


/////////////////////////////////////////////////////////////////////////////
// Message map

BEGIN_MESSAGE_MAP(CSquigglePropPage, COlePropertyPage)
	//{{AFX_MSG_MAP(CSquigglePropPage)
	// NOTE - ClassWizard will add and remove message map entries
	//    DO NOT EDIT what you see in these blocks of generated code !
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()


/////////////////////////////////////////////////////////////////////////////
// Initialize class factory and guid

IMPLEMENT_OLECREATE_EX(CSquigglePropPage, "SQUIGGLE.SquigglePropPage.1",
	0x14f0d027, 0x8c56, 0x11d5, 0xbb, 0x9f, 0, 0xa0, 0xc9, 0xe3, 0x21, 0xfd)


/////////////////////////////////////////////////////////////////////////////
// CSquigglePropPage::CSquigglePropPageFactory::UpdateRegistry -
// Adds or removes system registry entries for CSquigglePropPage

BOOL CSquigglePropPage::CSquigglePropPageFactory::UpdateRegistry(BOOL bRegister)
{
	if (bRegister)
		return AfxOleRegisterPropertyPageClass(AfxGetInstanceHandle(),
			m_clsid, IDS_SQUIGGLE_PPG);
	else
		return AfxOleUnregisterClass(m_clsid, NULL);
}


/////////////////////////////////////////////////////////////////////////////
// CSquigglePropPage::CSquigglePropPage - Constructor

CSquigglePropPage::CSquigglePropPage() :
	COlePropertyPage(IDD, IDS_SQUIGGLE_PPG_CAPTION)
{
	//{{AFX_DATA_INIT(CSquigglePropPage)
	m_bKeepDrawing = FALSE;
	m_iLenSquig = 0;
	m_iNbrSquiggles = 0;
	//}}AFX_DATA_INIT
}


/////////////////////////////////////////////////////////////////////////////
// CSquigglePropPage::DoDataExchange - Moves data between page and properties

void CSquigglePropPage::DoDataExchange(CDataExchange* pDX)
{
	//{{AFX_DATA_MAP(CSquigglePropPage)
	DDP_Check(pDX, IDC_CHECK1, m_bKeepDrawing, _T("KeepCurrentDrawing") );
	DDX_Check(pDX, IDC_CHECK1, m_bKeepDrawing);
	DDP_Text(pDX, IDC_ELENAQUIG, m_iLenSquig, _T("SquiggleLength") );
	DDX_Text(pDX, IDC_ELENAQUIG, m_iLenSquig);
	DDP_Text(pDX, IDC_ENBRSQUIG, m_iNbrSquiggles, _T("NumberSquiggle") );
	DDX_Text(pDX, IDC_ENBRSQUIG, m_iNbrSquiggles);
	//}}AFX_DATA_MAP
	DDP_PostProcessing(pDX);
}


/////////////////////////////////////////////////////////////////////////////
// CSquigglePropPage message handlers

⌨️ 快捷键说明

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