home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / Basic / Visual Basic.60 / COMMON / TOOLS / VCM / VCM.MDB / VcmComponentContainer / 23_Cabinet / IMAGEPPG.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1998-05-18  |  2.7 KB  |  89 lines

  1. // ImagePpg.cpp : Implementation of the CImagePropPage property page class.
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992-1998 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. #include "stdafx.h"
  14. #include "image.h"
  15. #include "ImagePpg.h"
  16.  
  17. #ifdef _DEBUG
  18. #define new DEBUG_NEW
  19. #undef THIS_FILE
  20. static char THIS_FILE[] = __FILE__;
  21. #endif
  22.  
  23.  
  24. IMPLEMENT_DYNCREATE(CImagePropPage, COlePropertyPage)
  25.  
  26.  
  27. /////////////////////////////////////////////////////////////////////////////
  28. // Message map
  29.  
  30. BEGIN_MESSAGE_MAP(CImagePropPage, COlePropertyPage)
  31.     //{{AFX_MSG_MAP(CImagePropPage)
  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(CImagePropPage, "IMAGE.ImagePropPage.1",
  42.     0x346685e4, 0xc383, 0x11cf, 0xa5, 0xa4, 0, 0xaa, 0, 0xa4, 0x57, 0x5)
  43.  
  44.  
  45. /////////////////////////////////////////////////////////////////////////////
  46. // CImagePropPage::CImagePropPageFactory::UpdateRegistry -
  47. // Adds or removes system registry entries for CImagePropPage
  48.  
  49. BOOL CImagePropPage::CImagePropPageFactory::UpdateRegistry(BOOL bRegister)
  50. {
  51.     if (bRegister)
  52.         return AfxOleRegisterPropertyPageClass(AfxGetInstanceHandle(),
  53.             m_clsid, IDS_IMAGE_PPG);
  54.     else
  55.         return AfxOleUnregisterClass(m_clsid, NULL);
  56. }
  57.  
  58.  
  59. /////////////////////////////////////////////////////////////////////////////
  60. // CImagePropPage::CImagePropPage - Constructor
  61.  
  62. CImagePropPage::CImagePropPage() :
  63.     COlePropertyPage(IDD, IDS_IMAGE_PPG_CAPTION)
  64. {
  65.     //{{AFX_DATA_INIT(CImagePropPage)
  66.     m_strImagePath = _T("");
  67.     m_bAutoSize = FALSE;
  68.     //}}AFX_DATA_INIT
  69. }
  70.  
  71.  
  72. /////////////////////////////////////////////////////////////////////////////
  73. // CImagePropPage::DoDataExchange - Moves data between page and properties
  74.  
  75. void CImagePropPage::DoDataExchange(CDataExchange* pDX)
  76. {
  77.     //{{AFX_DATA_MAP(CImagePropPage)
  78.     DDP_Text(pDX, IDC_IMAGEPATH, m_strImagePath, _T("ImagePath") );
  79.     DDX_Text(pDX, IDC_IMAGEPATH, m_strImagePath);
  80.     DDP_Check(pDX, IDC_AUTOSIZE, m_bAutoSize, _T("AutoSize") );
  81.     DDX_Check(pDX, IDC_AUTOSIZE, m_bAutoSize);
  82.     //}}AFX_DATA_MAP
  83.     DDP_PostProcessing(pDX);
  84. }
  85.  
  86.  
  87. /////////////////////////////////////////////////////////////////////////////
  88. // CImagePropPage message handlers
  89.