home *** CD-ROM | disk | FTP | other *** search
/ Mastering MFC Development / MMD.ISO / labs / c12 / lab01 / ex03 / palviewppg.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1997-02-20  |  2.4 KB  |  79 lines

  1. // PalViewPpg.cpp : Implementation of the CPalViewPropPage property page class.
  2.  
  3. #include "stdafx.h"
  4. #include "PalView.h"
  5. #include "PalViewPpg.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(CPalViewPropPage, COlePropertyPage)
  15.  
  16.  
  17. /////////////////////////////////////////////////////////////////////////////
  18. // Message map
  19.  
  20. BEGIN_MESSAGE_MAP(CPalViewPropPage, COlePropertyPage)
  21.     //{{AFX_MSG_MAP(CPalViewPropPage)
  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(CPalViewPropPage, "PALVIEW.PalViewPropPage.1",
  32.     0x7f7767c4, 0x365b, 0x11d0, 0x9c, 0x9d, 0, 0xa0, 0xd1, 0, 0xe3, 0xc8)
  33.  
  34.  
  35. /////////////////////////////////////////////////////////////////////////////
  36. // CPalViewPropPage::CPalViewPropPageFactory::UpdateRegistry -
  37. // Adds or removes system registry entries for CPalViewPropPage
  38.  
  39. BOOL CPalViewPropPage::CPalViewPropPageFactory::UpdateRegistry(BOOL bRegister)
  40. {
  41.     if (bRegister)
  42.         return AfxOleRegisterPropertyPageClass(AfxGetInstanceHandle(),
  43.             m_clsid, IDS_PALVIEW_PPG);
  44.     else
  45.         return AfxOleUnregisterClass(m_clsid, NULL);
  46. }
  47.  
  48.  
  49. /////////////////////////////////////////////////////////////////////////////
  50. // CPalViewPropPage::CPalViewPropPage - Constructor
  51.  
  52. CPalViewPropPage::CPalViewPropPage() :
  53.     COlePropertyPage(IDD, IDS_PALVIEW_PPG_CAPTION)
  54. {
  55.     //{{AFX_DATA_INIT(CPalViewPropPage)
  56.     m_bShowColorSelection = FALSE;
  57.     m_bShowID = FALSE;
  58.     //}}AFX_DATA_INIT
  59. }
  60.  
  61.  
  62. /////////////////////////////////////////////////////////////////////////////
  63. // CPalViewPropPage::DoDataExchange - Moves data between page and properties
  64.  
  65. void CPalViewPropPage::DoDataExchange(CDataExchange* pDX)
  66. {
  67.     //{{AFX_DATA_MAP(CPalViewPropPage)
  68.     DDP_Check(pDX, IDC_COLOR_SELECTION, m_bShowColorSelection, _T("ShowColorSelection") );
  69.     DDX_Check(pDX, IDC_COLOR_SELECTION, m_bShowColorSelection);
  70.     DDP_Check(pDX, IDC_3D_BOXES, m_bShowID, _T("Show3D") );
  71.     DDX_Check(pDX, IDC_3D_BOXES, m_bShowID);
  72.     //}}AFX_DATA_MAP
  73.     DDP_PostProcessing(pDX);
  74. }
  75.  
  76.  
  77. /////////////////////////////////////////////////////////////////////////////
  78. // CPalViewPropPage message handlers
  79.