home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / BC_502 / PUSH.PAK / PUSHPPG.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1997-05-06  |  2.7 KB  |  90 lines

  1. // pushppg.cpp : Implementation of the CPushPropPage property page class.
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992-1995 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12.  
  13.  
  14. #include "stdafx.h"
  15. #include "push.h"
  16. #include "pushppg.h"
  17.  
  18. #ifdef _DEBUG
  19. #undef THIS_FILE
  20. static char BASED_CODE THIS_FILE[] = __FILE__;
  21. #endif
  22.  
  23.  
  24. IMPLEMENT_DYNCREATE(CPushPropPage, COlePropertyPage)
  25.  
  26.  
  27. /////////////////////////////////////////////////////////////////////////////
  28. // Message map
  29.  
  30. BEGIN_MESSAGE_MAP(CPushPropPage, COlePropertyPage)
  31.     //{{AFX_MSG_MAP(CPushPropPage)
  32.     //}}AFX_MSG_MAP
  33. END_MESSAGE_MAP()
  34.  
  35.  
  36. /////////////////////////////////////////////////////////////////////////////
  37. // Initialize class factory and guid
  38.  
  39. IMPLEMENT_OLECREATE_EX(CPushPropPage, "PUSH.PushPropPage.1",
  40.     0x37446b88, 0x5870, 0x101b, 0xb5, 0x7b, 0x0, 0x60, 0x8c, 0xc9, 0x6a, 0xfa)
  41.  
  42.  
  43. /////////////////////////////////////////////////////////////////////////////
  44. // CPushPropPage::CPushPropPageFactory::UpdateRegistry -
  45. // Adds or removes system registry entries for CPushPropPage
  46.  
  47. BOOL CPushPropPage::CPushPropPageFactory::UpdateRegistry(BOOL bRegister)
  48. {
  49.     if (bRegister)
  50.         return AfxOleRegisterPropertyPageClass(AfxGetInstanceHandle(),
  51.             m_clsid, IDS_PUSH_PPG);
  52.     else
  53.         return AfxOleUnregisterClass(m_clsid, NULL);
  54. }
  55.  
  56.  
  57. /////////////////////////////////////////////////////////////////////////////
  58. // CPushPropPage::CPushPropPage - Constructor
  59.  
  60. CPushPropPage::CPushPropPage() :
  61.     COlePropertyPage(IDD, IDS_PUSH_PPG_CAPTION)
  62. {
  63.     //{{AFX_DATA_INIT(CPushPropPage)
  64.     m_Border = FALSE;
  65.     m_Caption = _T("");
  66.     m_Enabled = FALSE;
  67.     //}}AFX_DATA_INIT
  68. }
  69.  
  70.  
  71. /////////////////////////////////////////////////////////////////////////////
  72. // CPushPropPage::DoDataExchange - Moves data between page and properties
  73.  
  74. void CPushPropPage::DoDataExchange(CDataExchange* pDX)
  75. {
  76.     //{{AFX_DATA_MAP(CPushPropPage)
  77.     DDP_Check(pDX, IDC_BORDERCHECK, m_Border, _T("BorderStyle"));
  78.     DDX_Check(pDX, IDC_BORDERCHECK, m_Border);
  79.     DDP_Text(pDX, IDC_CAPTIONEDIT, m_Caption, _T("Caption"));
  80.     DDX_Text(pDX, IDC_CAPTIONEDIT, m_Caption);
  81.     DDP_Check(pDX, IDC_ENABLEDCHECK, m_Enabled, _T("Enabled"));
  82.     DDX_Check(pDX, IDC_ENABLEDCHECK, m_Enabled);
  83.     //}}AFX_DATA_MAP
  84.     DDP_PostProcessing(pDX);
  85. }
  86.  
  87.  
  88. /////////////////////////////////////////////////////////////////////////////
  89. // CPushPropPage message handlers
  90.