home *** CD-ROM | disk | FTP | other *** search
- /////////////////////////////////////////////////////////////////////////////
- // %1
-
- IMPLEMENT_DYNCREATE(%1, %2)
-
- %1::%1()
- {
- $$IF(OLEAUTO)
- EnableAutomation();
- $$ENDIF
- $$IF(OLECREATE)
-
- // To keep the application running as long as an OLE automation
- // object is active, the constructor calls AfxOleLockApp.
-
- AfxOleLockApp();
- $$ENDIF
- }
-
- BOOL %1::OnNewDocument()
- {
- if (!%2::OnNewDocument())
- return FALSE;
- return TRUE;
- }
-
- %1::~%1()
- {
- $$IF(OLECREATE)
- // To terminate the application when all objects created with
- // with OLE automation, the destructor calls AfxOleUnlockApp.
-
- AfxOleUnlockApp();
- $$ENDIF
- }
- $$IF(OLEAUTO)
-
- void %1::OnFinalRelease()
- {
- // When the last reference for an automation object is released
- // OnFinalRelease is called. The base class will automatically
- // deletes the object. Add additional cleanup required for your
- // object before calling the base class.
-
- %2::OnFinalRelease();
- }
- $$ENDIF
- $$IF(OLESERVERDOC)
-
- COleServerItem* %1::OnGetEmbeddedItem()
- {
- // OnGetEmbeddedItem is called by the framework to get the COleServerItem
- // that is associated with the document. It is only called when necessary.
-
- // Instead of returning NULL, return a pointer to a new COleServerItem
- // derived class that is used in conjunction with this document, then
- // remove the ASSERT(FALSE) below.
- // (i.e., return new CMyServerItem.)
- ASSERT(FALSE); // remove this after completing the TODO
- return NULL;
- }
- $$ENDIF
-
-
- BEGIN_MESSAGE_MAP(%1, %2)
- //{{AFX_MSG_MAP(%1)
- // NOTE - the ClassWizard will add and remove mapping macros here.
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- $$IF(OLEAUTO)
-
- BEGIN_DISPATCH_MAP(%1, %2)
- //{{AFX_DISPATCH_MAP(%1)
- // NOTE - the ClassWizard will add and remove mapping macros here.
- //}}AFX_DISPATCH_MAP
- END_DISPATCH_MAP()
-
- // Note: we add support for IID_I%c to support typesafe binding
- // from VBA. This IID must match the GUID that is attached to the
- // dispinterface in the .ODL file.
-
- // {%b}
- static const IID IID_I%c =
- %d;
-
- BEGIN_INTERFACE_MAP(%1, %2)
- INTERFACE_PART(%1, IID_I%c, Dispatch)
- END_INTERFACE_MAP()
- $$ENDIF //OLEAUTO
- $$IF(OLECREATE)
-
- // {%e}
- IMPLEMENT_OLECREATE(%1, "%6", %7)
- $$ENDIF //OLECREATE
-
- /////////////////////////////////////////////////////////////////////////////
- // %1 diagnostics
-
- #ifdef _DEBUG
- void %1::AssertValid() const
- {
- %2::AssertValid();
- }
-
- void %1::Dump(CDumpContext& dc) const
- {
- %2::Dump(dc);
- }
- #endif //_DEBUG
-
- /////////////////////////////////////////////////////////////////////////////
- // %1 serialization
-
- void %1::Serialize(CArchive& ar)
- {
- if (ar.IsStoring())
- {
- // TODO: add storing code here
- }
- else
- {
- // TODO: add loading code here
- }
- }
-
- /////////////////////////////////////////////////////////////////////////////
- // %1 commands