home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgLangD.iso / Java++ / SHAREDIDE / BIN / MFCCLWZ.DLL / SRCDATA / RICHVIEW.CPP < prev    next >
Encoding:
Text File  |  1997-01-27  |  1.9 KB  |  91 lines

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