ActiveX


MyCtrlPpg.cpp


// MyCtrlPpg.cpp : Implementation of the CMyCtrlPropPage property page class.

#include "stdafx.h"

#include "MyCtrl.h"

#include "MyCtrlPpg.h"

#ifdef _DEBUG

#define new DEBUG_NEW

#undef THIS_FILE

static char THIS_FILE[] = __FILE__;

#endif

IMPLEMENT_DYNCREATE(CMyCtrlPropPage, COlePropertyPage)

/////////////////////////////////////////////////////////////////////////////

// Message map

BEGIN_MESSAGE_MAP(CMyCtrlPropPage, COlePropertyPage)

//{{AFX_MSG_MAP(CMyCtrlPropPage)

// 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(CMyCtrlPropPage, "MYCTRL.MyCtrlPropPage.1",

0x49e2f380, 0xb48d, 0x11d3, 0xa2, 0xb0, 0, 0xa0, 0xc9, 0x55, 0xfa, 0x9e)

/////////////////////////////////////////////////////////////////////////////

// CMyCtrlPropPage::CMyCtrlPropPageFactory::UpdateRegistry -

// Adds or removes system registry entries for CMyCtrlPropPage

BOOL CMyCtrlPropPage::CMyCtrlPropPageFactory::UpdateRegistry(BOOL bRegister)

{

if (bRegister)

return AfxOleRegisterPropertyPageClass(AfxGetInstanceHandle(),

m_clsid, IDS_MYCTRL_PPG);

else

return AfxOleUnregisterClass(m_clsid, NULL);

}

/////////////////////////////////////////////////////////////////////////////

// CMyCtrlPropPage::CMyCtrlPropPage - Constructor

CMyCtrlPropPage::CMyCtrlPropPage() :

COlePropertyPage(IDD, IDS_MYCTRL_PPG_CAPTION)

{

//{{AFX_DATA_INIT(CMyCtrlPropPage)

m_nShape = -1;

m_Caption = _T("");

m_timeSleep = _T("");

//}}AFX_DATA_INIT

}

/////////////////////////////////////////////////////////////////////////////

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

void CMyCtrlPropPage::DoDataExchange(CDataExchange* pDX)

{

//{{AFX_DATA_MAP(CMyCtrlPropPage)

DDP_CBIndex(pDX, IDC_CBSHAPE, m_nShape, _T("Shape") );

DDX_CBIndex(pDX, IDC_CBSHAPE, m_nShape);

DDP_Text(pDX, IDC_CAPTION, m_Caption, _T("Caption") );

DDX_Text(pDX, IDC_CAPTION, m_Caption);

DDP_Text(pDX, IDC_SLEEP, m_timeSleep, _T("Sleep") );

DDX_Text(pDX, IDC_SLEEP, m_timeSleep);

//}}AFX_DATA_MAP

DDP_PostProcessing(pDX);

}

/////////////////////////////////////////////////////////////////////////////

// CMyCtrlPropPage message handlers




- -  - -  - -