home *** CD-ROM | disk | FTP | other *** search
/ Building OCXs / Building_OCXs_Que_1995.iso / code / ch10 / timerppg.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1994-12-14  |  2.3 KB  |  79 lines

  1. // timerppg.cpp : Implementation of the CTimerPropPage property page class.
  2.  
  3. #include "stdafx.h"
  4. #include "timer.h"
  5. #include "timerppg.h"
  6.  
  7. #ifdef _DEBUG
  8. #undef THIS_FILE
  9. static char BASED_CODE THIS_FILE[] = __FILE__;
  10. #endif
  11.  
  12.  
  13. IMPLEMENT_DYNCREATE(CTimerPropPage, COlePropertyPage)
  14.  
  15.  
  16. /////////////////////////////////////////////////////////////////////////////
  17. // Message map
  18.  
  19. BEGIN_MESSAGE_MAP(CTimerPropPage, COlePropertyPage)
  20.     //{{AFX_MSG_MAP(CTimerPropPage)
  21.     // NOTE - ClassWizard will add and remove message map entries
  22.     //    DO NOT EDIT what you see in these blocks of generated code !
  23.     //}}AFX_MSG_MAP
  24. END_MESSAGE_MAP()
  25.  
  26.  
  27. /////////////////////////////////////////////////////////////////////////////
  28. // Initialize class factory and guid
  29.  
  30. IMPLEMENT_OLECREATE_EX(CTimerPropPage, "TIMER.TimerPropPage.1",
  31.     0x56e0b3b4, 0x1784, 0x11ce, 0x96, 0xf, 0x52, 0x41, 0x53, 0x48, 0x0, 0x5)
  32.  
  33.  
  34. /////////////////////////////////////////////////////////////////////////////
  35. // CTimerPropPage::CTimerPropPageFactory::UpdateRegistry -
  36. // Adds or removes system registry entries for CTimerPropPage
  37.  
  38. BOOL CTimerPropPage::CTimerPropPageFactory::UpdateRegistry(BOOL bRegister)
  39. {
  40.     if (bRegister)
  41.         return AfxOleRegisterPropertyPageClass(AfxGetInstanceHandle(),
  42.             m_clsid, IDS_TIMER_PPG);
  43.     else
  44.         return AfxOleUnregisterClass(m_clsid, NULL);
  45. }
  46.  
  47.  
  48. /////////////////////////////////////////////////////////////////////////////
  49. // CTimerPropPage::CTimerPropPage - Constructor
  50.  
  51. CTimerPropPage::CTimerPropPage() :
  52.     COlePropertyPage(IDD, IDS_TIMER_PPG_CAPTION)
  53. {
  54.     //{{AFX_DATA_INIT(CTimerPropPage)
  55.     m_Enabled = FALSE;
  56.     m_Interval = 0;
  57.     //}}AFX_DATA_INIT
  58. }
  59.  
  60.  
  61. /////////////////////////////////////////////////////////////////////////////
  62. // CTimerPropPage::DoDataExchange - Moves data between page and properties
  63.  
  64. void CTimerPropPage::DoDataExchange(CDataExchange* pDX)
  65. {
  66.     //{{AFX_DATA_MAP(CTimerPropPage)
  67.     DDP_Check(pDX, IDC_ENABLEDCHECK, m_Enabled, _T("Enabled") );
  68.     DDX_Check(pDX, IDC_ENABLEDCHECK, m_Enabled);
  69.     DDP_Text(pDX, IDC_INTERVALEDIT, m_Interval, _T("Interval") );
  70.     DDX_Text(pDX, IDC_INTERVALEDIT, m_Interval);
  71.     DDV_MaxChars(pDX, m_Interval, 32767);
  72.     //}}AFX_DATA_MAP
  73.     DDP_PostProcessing(pDX);
  74. }
  75.  
  76.  
  77. /////////////////////////////////////////////////////////////////////////////
  78. // CTimerPropPage message handlers
  79.