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

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