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

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