home *** CD-ROM | disk | FTP | other *** search
/ Using Visual C++ 4 (Special Edition) / Using_Visual_C_4_Special_Edition_QUE_1996.iso / ch11 / calenppg.cpp < prev    next >
C/C++ Source or Header  |  1995-10-25  |  2KB  |  79 lines

  1. // CalenPpg.cpp : Implementation of the CCalenPropPage property page class.
  2.  
  3. #include "stdafx.h"
  4. #include "Calen.h"
  5. #include "CalenPpg.h"
  6.  
  7. #ifdef _DEBUG
  8. #define new DEBUG_NEW
  9. #undef THIS_FILE
  10. static char THIS_FILE[] = __FILE__;
  11. #endif
  12.  
  13.  
  14. IMPLEMENT_DYNCREATE(CCalenPropPage, COlePropertyPage)
  15.  
  16.  
  17. /////////////////////////////////////////////////////////////////////////////
  18. // Message map
  19.  
  20. BEGIN_MESSAGE_MAP(CCalenPropPage, COlePropertyPage)
  21.     //{{AFX_MSG_MAP(CCalenPropPage)
  22.     // NOTE - ClassWizard will add and remove message map entries
  23.     //    DO NOT EDIT what you see in these blocks of generated code !
  24.     //}}AFX_MSG_MAP
  25. END_MESSAGE_MAP()
  26.  
  27.  
  28. /////////////////////////////////////////////////////////////////////////////
  29. // Initialize class factory and guid
  30.  
  31. IMPLEMENT_OLECREATE_EX(CCalenPropPage, "CALEN.CalenPropPage.1",
  32.     0xf0464dd4, 0xd57, 0x11cf, 0xb4, 0xcd, 0, 0x80, 0xc8, 0x1a, 0x39, 0x7c)
  33.  
  34.  
  35. /////////////////////////////////////////////////////////////////////////////
  36. // CCalenPropPage::CCalenPropPageFactory::UpdateRegistry -
  37. // Adds or removes system registry entries for CCalenPropPage
  38.  
  39. BOOL CCalenPropPage::CCalenPropPageFactory::UpdateRegistry(BOOL bRegister)
  40. {
  41.     if (bRegister)
  42.         return AfxOleRegisterPropertyPageClass(AfxGetInstanceHandle(),
  43.             m_clsid, IDS_CALEN_PPG);
  44.     else
  45.         return AfxOleUnregisterClass(m_clsid, NULL);
  46. }
  47.  
  48.  
  49. /////////////////////////////////////////////////////////////////////////////
  50. // CCalenPropPage::CCalenPropPage - Constructor
  51.  
  52. CCalenPropPage::CCalenPropPage() :
  53.     COlePropertyPage(IDD, IDS_CALEN_PPG_CAPTION)
  54. {
  55.     //{{AFX_DATA_INIT(CCalenPropPage)
  56.     m_threeD = FALSE;
  57.     m_ctrlBorderStyle = -1;
  58.     //}}AFX_DATA_INIT
  59. }
  60.  
  61.  
  62. /////////////////////////////////////////////////////////////////////////////
  63. // CCalenPropPage::DoDataExchange - Moves data between page and properties
  64.  
  65. void CCalenPropPage::DoDataExchange(CDataExchange* pDX)
  66. {
  67.     //{{AFX_DATA_MAP(CCalenPropPage)
  68.     DDP_Check(pDX, IDC_THREED, m_threeD, _T("ThreeD") );
  69.     DDX_Check(pDX, IDC_THREED, m_threeD);
  70.     DDP_CBIndex(pDX, IDC_CBORDERSTYLE, m_ctrlBorderStyle, _T("CtrlBorderStyle") );
  71.     DDX_CBIndex(pDX, IDC_CBORDERSTYLE, m_ctrlBorderStyle);
  72.     //}}AFX_DATA_MAP
  73.     DDP_PostProcessing(pDX);
  74. }
  75.  
  76.  
  77. /////////////////////////////////////////////////////////////////////////////
  78. // CCalenPropPage message handlers
  79.