home *** CD-ROM | disk | FTP | other *** search
/ Mastering MFC Development / MMD.ISO / samples / c12 / simpledual / simpleppg.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1997-02-20  |  1.9 KB  |  71 lines

  1. // SimplePpg.cpp : Implementation of the CSimplePropPage property page class.
  2.  
  3. #include "stdafx.h"
  4. #include "Simple.h"
  5. #include "SimplePpg.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(CSimplePropPage, COlePropertyPage)
  15.  
  16.  
  17. /////////////////////////////////////////////////////////////////////////////
  18. // Message map
  19.  
  20. BEGIN_MESSAGE_MAP(CSimplePropPage, COlePropertyPage)
  21.     //{{AFX_MSG_MAP(CSimplePropPage)
  22.     //}}AFX_MSG_MAP
  23. END_MESSAGE_MAP()
  24.  
  25.  
  26. /////////////////////////////////////////////////////////////////////////////
  27. // Initialize class factory and guid
  28.  
  29. IMPLEMENT_OLECREATE_EX(CSimplePropPage, "SIMPLE.SimplePropPage.1",
  30.     0xc48a81e4, 0x4384, 0x11d0, 0x9c, 0x9d, 0, 0, 0, 0, 0, 0)
  31.  
  32.  
  33. /////////////////////////////////////////////////////////////////////////////
  34. // CSimplePropPage::CSimplePropPageFactory::UpdateRegistry -
  35. // Adds or removes system registry entries for CSimplePropPage
  36.  
  37. BOOL CSimplePropPage::CSimplePropPageFactory::UpdateRegistry(BOOL bRegister)
  38. {
  39.     if (bRegister)
  40.         return AfxOleRegisterPropertyPageClass(AfxGetInstanceHandle(),
  41.             m_clsid, IDS_SIMPLE_PPG);
  42.     else
  43.         return AfxOleUnregisterClass(m_clsid, NULL);
  44. }
  45.  
  46.  
  47. /////////////////////////////////////////////////////////////////////////////
  48. // CSimplePropPage::CSimplePropPage - Constructor
  49.  
  50. CSimplePropPage::CSimplePropPage() :
  51.     COlePropertyPage(IDD, IDS_SIMPLE_PPG_CAPTION)
  52. {
  53.     //{{AFX_DATA_INIT(CSimplePropPage)
  54.     //}}AFX_DATA_INIT
  55. }
  56.  
  57.  
  58. /////////////////////////////////////////////////////////////////////////////
  59. // CSimplePropPage::DoDataExchange - Moves data between page and properties
  60.  
  61. void CSimplePropPage::DoDataExchange(CDataExchange* pDX)
  62. {
  63.     //{{AFX_DATA_MAP(CSimplePropPage)
  64.     //}}AFX_DATA_MAP
  65.     DDP_PostProcessing(pDX);
  66. }
  67.  
  68.  
  69. /////////////////////////////////////////////////////////////////////////////
  70. // CSimplePropPage message handlers
  71.