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 / MDICHILD.CPP < prev    next >
Text File  |  1998-06-18  |  2KB  |  76 lines

  1. /////////////////////////////////////////////////////////////////////////////
  2. // %1
  3.  
  4. IMPLEMENT_DYNCREATE(%1, CMDIChildWnd)
  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.     CMDIChildWnd::OnFinalRelease();
  39. }
  40. $$ENDIF
  41.  
  42.  
  43. BEGIN_MESSAGE_MAP(%1, CMDIChildWnd)
  44.     //{{AFX_MSG_MAP(%1)
  45.         // NOTE - the ClassWizard will add and remove mapping macros here.
  46.     //}}AFX_MSG_MAP
  47. END_MESSAGE_MAP()
  48. $$IF(OLEAUTO)
  49.  
  50. BEGIN_DISPATCH_MAP(%1, CMDIChildWnd)
  51.     //{{AFX_DISPATCH_MAP(%1)
  52.         // NOTE - the ClassWizard will add and remove mapping macros here.
  53.     //}}AFX_DISPATCH_MAP
  54. END_DISPATCH_MAP()
  55.  
  56. // Note: we add support for IID_I%c to support typesafe binding
  57. //  from VBA.  This IID must match the GUID that is attached to the 
  58. //  dispinterface in the .ODL file.
  59.  
  60. // {%b}
  61. static const IID IID_I%c =
  62. %d;
  63.  
  64. BEGIN_INTERFACE_MAP(%1, CMDIChildWnd)
  65.     INTERFACE_PART(%1, IID_I%c, Dispatch)
  66. END_INTERFACE_MAP()
  67. $$ENDIF //OLEAUTO
  68. $$IF(OLECREATE)
  69.  
  70. // {%e}
  71. IMPLEMENT_OLECREATE(%1, "%6", %7)
  72. $$ENDIF //OLECREATE
  73.  
  74. /////////////////////////////////////////////////////////////////////////////
  75. // %1 message handlers