home *** CD-ROM | disk | FTP | other *** search
/ distrib.akp.su/Programming/Vb-6+Rus/ / distrib.akp.su.tar / distrib.akp.su / Programming / Vb-6+Rus / COMMON / MSDEV98 / BIN / MFCCLWZ.DLL / SRCDATA / FORMVIEW.CPP < prev    next >
Text File  |  1998-06-18  |  2KB  |  104 lines

  1. /////////////////////////////////////////////////////////////////////////////
  2. // %1
  3.  
  4. IMPLEMENT_DYNCREATE(%1, CFormView)
  5.  
  6. %1::%1()
  7.     : CFormView(%1::IDD)
  8. {
  9. $$IF(OLEAUTO)
  10.     EnableAutomation();
  11. $$ENDIF
  12. $$IF(OLECREATE)
  13.     
  14.     // To keep the application running as long as an OLE automation 
  15.     //    object is active, the constructor calls AfxOleLockApp.
  16.     
  17.     AfxOleLockApp();
  18.  
  19. $$ENDIF
  20.     //{{AFX_DATA_INIT(%1)
  21.         // NOTE: the ClassWizard will add member initialization here
  22.     //}}AFX_DATA_INIT
  23. }
  24.  
  25. %1::~%1()
  26. {
  27. $$IF(OLECREATE)
  28.     // To terminate the application when all objects created with
  29.     //     with OLE automation, the destructor calls AfxOleUnlockApp.
  30.     
  31.     AfxOleUnlockApp();
  32. $$ENDIF
  33. }
  34. $$IF(OLEAUTO)
  35.  
  36. void %1::OnFinalRelease()
  37. {
  38.     // When the last reference for an automation object is released
  39.     // OnFinalRelease is called.  The base class will automatically
  40.     // deletes the object.  Add additional cleanup required for your
  41.     // object before calling the base class.
  42.  
  43.     CFormView::OnFinalRelease();
  44. }
  45. $$ENDIF
  46.  
  47. void %1::DoDataExchange(CDataExchange* pDX)
  48. {
  49.     CFormView::DoDataExchange(pDX);
  50.     //{{AFX_DATA_MAP(%1)
  51.         // NOTE: the ClassWizard will add DDX and DDV calls here
  52.     //}}AFX_DATA_MAP
  53. }
  54.  
  55.  
  56. BEGIN_MESSAGE_MAP(%1, CFormView)
  57.     //{{AFX_MSG_MAP(%1)
  58.         // NOTE - the ClassWizard will add and remove mapping macros here.
  59.     //}}AFX_MSG_MAP
  60. END_MESSAGE_MAP()
  61. $$IF(OLEAUTO)
  62.  
  63. BEGIN_DISPATCH_MAP(%1, CFormView)
  64.     //{{AFX_DISPATCH_MAP(%1)
  65.         // NOTE - the ClassWizard will add and remove mapping macros here.
  66.     //}}AFX_DISPATCH_MAP
  67. END_DISPATCH_MAP()
  68.  
  69. // Note: we add support for IID_I%c to support typesafe binding
  70. //  from VBA.  This IID must match the GUID that is attached to the 
  71. //  dispinterface in the .ODL file.
  72.  
  73. // {%b}
  74. static const IID IID_I%c =
  75. %d;
  76.  
  77. BEGIN_INTERFACE_MAP(%1, CFormView)
  78.     INTERFACE_PART(%1, IID_I%c, Dispatch)
  79. END_INTERFACE_MAP()
  80. $$ENDIF //OLEAUTO
  81. $$IF(OLECREATE)
  82.  
  83. // {%e}
  84. IMPLEMENT_OLECREATE(%1, "%6", %7)
  85. $$ENDIF //OLECREATE
  86.  
  87. /////////////////////////////////////////////////////////////////////////////
  88. // %1 diagnostics
  89.  
  90. #ifdef _DEBUG
  91. void %1::AssertValid() const
  92. {
  93.     CFormView::AssertValid();
  94. }
  95.  
  96. void %1::Dump(CDumpContext& dc) const
  97. {
  98.     CFormView::Dump(dc);
  99. }
  100. #endif //_DEBUG
  101.  
  102. /////////////////////////////////////////////////////////////////////////////
  103. // %1 message handlers