// TestOCXPpg.cpp : Implementation of the CTestOCXPropPage property page class.

#include "stdafx.h"
#include "TestOCX.h"
#include "TestOCXPpg.h"

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


IMPLEMENT_DYNCREATE(CTestOCXPropPage, COlePropertyPage)


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

BEGIN_MESSAGE_MAP(CTestOCXPropPage, COlePropertyPage)
	//{{AFX_MSG_MAP(CTestOCXPropPage)
	// 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(CTestOCXPropPage, "TESTOCX.TestOCXPropPage.1",
	0xf4cbb31c, 0x83b9, 0x403b, 0x9d, 0x77, 0x72, 0x93, 0x9e, 0x10, 0xd5, 0xd7)


/////////////////////////////////////////////////////////////////////////////
// CTestOCXPropPage::CTestOCXPropPageFactory::UpdateRegistry -
// Adds or removes system registry entries for CTestOCXPropPage

BOOL CTestOCXPropPage::CTestOCXPropPageFactory::UpdateRegistry(BOOL bRegister)
{
	if (bRegister)
		return AfxOleRegisterPropertyPageClass(AfxGetInstanceHandle(),
			m_clsid, IDS_TESTOCX_PPG);
	else
		return AfxOleUnregisterClass(m_clsid, NULL);
}


/////////////////////////////////////////////////////////////////////////////
// CTestOCXPropPage::CTestOCXPropPage - Constructor

CTestOCXPropPage::CTestOCXPropPage() :
	COlePropertyPage(IDD, IDS_TESTOCX_PPG_CAPTION)
{
	//{{AFX_DATA_INIT(CTestOCXPropPage)
	// NOTE: ClassWizard will add member initialization here
	//    DO NOT EDIT what you see in these blocks of generated code !
	//}}AFX_DATA_INIT
}


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

void CTestOCXPropPage::DoDataExchange(CDataExchange* pDX)
{
	//{{AFX_DATA_MAP(CTestOCXPropPage)
	// NOTE: ClassWizard will add DDP, DDX, and DDV calls here
	//    DO NOT EDIT what you see in these blocks of generated code !
	//}}AFX_DATA_MAP
	DDP_PostProcessing(pDX);
}


/////////////////////////////////////////////////////////////////////////////
// CTestOCXPropPage message handlers
