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 / MDISPLIT.CPP < prev    next >
Text File  |  1998-06-18  |  2KB  |  84 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. BOOL %1::OnCreateClient(LPCREATESTRUCT /*lpcs*/, CCreateContext* pContext)
  43. {
  44.     return m_wndSplitter.Create(this,
  45.         2, 2,       // TODO: adjust the number of rows, columns
  46.         CSize(10, 10),  // TODO: adjust the minimum pane size
  47.         pContext);
  48. }
  49.  
  50.  
  51. BEGIN_MESSAGE_MAP(%1, CMDIChildWnd)
  52.     //{{AFX_MSG_MAP(%1)
  53.         // NOTE - the ClassWizard will add and remove mapping macros here.
  54.     //}}AFX_MSG_MAP
  55. END_MESSAGE_MAP()
  56. $$IF(OLEAUTO)
  57.  
  58. BEGIN_DISPATCH_MAP(%1, CMDIChildWnd)
  59.     //{{AFX_DISPATCH_MAP(%1)
  60.         // NOTE - the ClassWizard will add and remove mapping macros here.
  61.     //}}AFX_DISPATCH_MAP
  62. END_DISPATCH_MAP()
  63.  
  64. // Note: we add support for IID_I%c to support typesafe binding
  65. //  from VBA.  This IID must match the GUID that is attached to the 
  66. //  dispinterface in the .ODL file.
  67.  
  68. // {%b}
  69. static const IID IID_I%c =
  70. %d;
  71.  
  72. BEGIN_INTERFACE_MAP(%1, CMDIChildWnd)
  73.     INTERFACE_PART(%1, IID_I%c, Dispatch)
  74. END_INTERFACE_MAP()
  75. $$ENDIF //OLEAUTO
  76. $$IF(OLECREATE)
  77.  
  78. // {%e}
  79. IMPLEMENT_OLECREATE(%1, "%6", %7)
  80. $$ENDIF //OLECREATE
  81.  
  82. /////////////////////////////////////////////////////////////////////////////
  83. // %1 message handlers