home *** CD-ROM | disk | FTP | other *** search
/ Building OCXs / Building_OCXs_Que_1995.iso / code / ch04 / quoteppg.cpp < prev    next >
C/C++ Source or Header  |  1994-12-18  |  3KB  |  84 lines

  1. //------------------------------------------------------------------//
  2. // Implementation of CQuotePropPage property page class                //
  3. //                                                                    //
  4. // System:    Simple first control.                                   //
  5. //            Developing Applications with OCX                        //
  6. // Module:    CQuotePropPage class implementation                        //
  7. // Date:    1/11/1994                                                //
  8. // Rev:        1.0                                                           //
  9. //                                                                       //
  10. // Author:    John Toohey                                                   //
  11. //                                                                       //
  12. //------------------------------------------------------------------//
  13.  
  14. #include "stdafx.h"
  15. #include "quote.h"
  16. #include "quoteppg.h"
  17.  
  18. #ifdef _DEBUG
  19. #undef THIS_FILE
  20. static char BASED_CODE THIS_FILE[] = __FILE__;
  21. #endif
  22.  
  23.  
  24. IMPLEMENT_DYNCREATE(CQuotePropPage, COlePropertyPage)
  25.  
  26.  
  27. /////////////////////////////////////////////////////////////////////////////
  28. // Message map
  29.  
  30. BEGIN_MESSAGE_MAP(CQuotePropPage, COlePropertyPage)
  31.     //{{AFX_MSG_MAP(CQuotePropPage)
  32.     // NOTE - ClassWizard will add and remove message map entries
  33.     //    DO NOT EDIT what you see in these blocks of generated code !
  34.     //}}AFX_MSG_MAP
  35. END_MESSAGE_MAP()
  36.  
  37.  
  38. /////////////////////////////////////////////////////////////////////////////
  39. // Initialize class factory and guid
  40.  
  41. IMPLEMENT_OLECREATE_EX(CQuotePropPage, "QUOTE.QuotePropPage.1",
  42.     0x7c647084, 0xf1cb, 0x101b, 0x81, 0xec, 0xb2, 0x31, 0x69, 0x42, 0x46, 0x30)
  43.  
  44.  
  45. /////////////////////////////////////////////////////////////////////////////
  46. // CQuotePropPage::CQuotePropPageFactory::UpdateRegistry -
  47. // Adds or removes system registry entries for CQuotePropPage
  48.  
  49. BOOL CQuotePropPage::CQuotePropPageFactory::UpdateRegistry(BOOL bRegister)
  50. {
  51.     if (bRegister)
  52.         return AfxOleRegisterPropertyPageClass(AfxGetInstanceHandle(),
  53.             m_clsid, IDS_QUOTE_PPG);
  54.     else
  55.         return AfxOleUnregisterClass(m_clsid, NULL);
  56. }
  57.  
  58.  
  59. /////////////////////////////////////////////////////////////////////////////
  60. // CQuotePropPage::CQuotePropPage - Constructor
  61.  
  62. CQuotePropPage::CQuotePropPage() :
  63.     COlePropertyPage(IDD, IDS_QUOTE_PPG_CAPTION)
  64. {
  65.     //{{AFX_DATA_INIT(CQuotePropPage)
  66.     m_bShowAuthor = FALSE;
  67.     //}}AFX_DATA_INIT
  68. }
  69.  
  70.  
  71. /////////////////////////////////////////////////////////////////////////////
  72. // CQuotePropPage::DoDataExchange - Moves data between page and properties
  73.  
  74. void CQuotePropPage::DoDataExchange(CDataExchange* pDX)
  75. {
  76.     //{{AFX_DATA_MAP(CQuotePropPage)
  77.     DDP_Check(pDX, IDC_SHOWAUTHOR, m_bShowAuthor, _T("ShowAuthor") );
  78.     DDX_Check(pDX, IDC_SHOWAUTHOR, m_bShowAuthor);
  79.     //}}AFX_DATA_MAP
  80.     DDP_PostProcessing(pDX);
  81. }
  82. /////////////////////////////////////////////////////////////////////////////
  83. // CQuotePropPage message handlers
  84.