singleocxppg.cpp

来自「深入浅出Visual C++入门进阶与应用实例 随书光盘 作者 何志丹」· C++ 代码 · 共 76 行

CPP
76
字号
// SingleOcxPpg.cpp : Implementation of the CSingleOcxPropPage property page class.

#include "stdafx.h"
#include "SingleOcx.h"
#include "SingleOcxPpg.h"

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


IMPLEMENT_DYNCREATE(CSingleOcxPropPage, COlePropertyPage)


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

BEGIN_MESSAGE_MAP(CSingleOcxPropPage, COlePropertyPage)
	//{{AFX_MSG_MAP(CSingleOcxPropPage)
	// 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(CSingleOcxPropPage, "SINGLEOCX.SingleOcxPropPage.1",
	0xbf799ab1, 0x1338, 0x4943, 0x98, 0xa4, 0xb7, 0x59, 0x58, 0x85, 0x53, 0x32)


/////////////////////////////////////////////////////////////////////////////
// CSingleOcxPropPage::CSingleOcxPropPageFactory::UpdateRegistry -
// Adds or removes system registry entries for CSingleOcxPropPage

BOOL CSingleOcxPropPage::CSingleOcxPropPageFactory::UpdateRegistry(BOOL bRegister)
{
	if (bRegister)
		return AfxOleRegisterPropertyPageClass(AfxGetInstanceHandle(),
			m_clsid, IDS_SINGLEOCX_PPG);
	else
		return AfxOleUnregisterClass(m_clsid, NULL);
}


/////////////////////////////////////////////////////////////////////////////
// CSingleOcxPropPage::CSingleOcxPropPage - Constructor

CSingleOcxPropPage::CSingleOcxPropPage() :
	COlePropertyPage(IDD, IDS_SINGLEOCX_PPG_CAPTION)
{
	//{{AFX_DATA_INIT(CSingleOcxPropPage)
	m_xPos = 0;
	//}}AFX_DATA_INIT
}


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

void CSingleOcxPropPage::DoDataExchange(CDataExchange* pDX)
{
	//{{AFX_DATA_MAP(CSingleOcxPropPage)
	DDP_Text(pDX, IDC_EDIT1, m_xPos, _T("xPos") );
	DDX_Text(pDX, IDC_EDIT1, m_xPos);
	//}}AFX_DATA_MAP
	DDP_PostProcessing(pDX);
}


/////////////////////////////////////////////////////////////////////////////
// CSingleOcxPropPage message handlers

⌨️ 快捷键说明

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