home *** CD-ROM | disk | FTP | other *** search
- // MsgTracerDoc.cpp : implementation of the CMsgTracerDoc class
- //
-
- #include "stdafx.h"
- #include "MsgTracer.h"
-
- #include "MsgTracerDoc.h"
-
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
-
- /////////////////////////////////////////////////////////////////////////////
- // CMsgTracerDoc
-
- IMPLEMENT_DYNCREATE(CMsgTracerDoc, CDocument)
-
- BEGIN_MESSAGE_MAP(CMsgTracerDoc, CDocument)
- //{{AFX_MSG_MAP(CMsgTracerDoc)
- // NOTE - the ClassWizard will add and remove mapping macros here.
- // DO NOT EDIT what you see in these blocks of generated code!
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
-
- BEGIN_DISPATCH_MAP(CMsgTracerDoc, CDocument)
- //{{AFX_DISPATCH_MAP(CMsgTracerDoc)
- // NOTE - the ClassWizard will add and remove mapping macros here.
- // DO NOT EDIT what you see in these blocks of generated code!
- //}}AFX_DISPATCH_MAP
- END_DISPATCH_MAP()
-
- // Note: we add support for IID_IMsgTracer to support typesafe binding
- // from VBA. This IID must match the GUID that is attached to the
- // dispinterface in the .ODL file.
-
- // {A5FE8A8C-546E-11D1-BB3E-0040959A2C67}
- static const IID IID_IMsgTracer =
- { 0xa5fe8a8c, 0x546e, 0x11d1, { 0xbb, 0x3e, 0x0, 0x40, 0x95, 0x9a, 0x2c, 0x67 } };
-
- BEGIN_INTERFACE_MAP(CMsgTracerDoc, CDocument)
- INTERFACE_PART(CMsgTracerDoc, IID_IMsgTracer, Dispatch)
- END_INTERFACE_MAP()
-
- /////////////////////////////////////////////////////////////////////////////
- // CMsgTracerDoc construction/destruction
-
- CMsgTracerDoc::CMsgTracerDoc()
- {
- // TODO: add one-time construction code here
-
- EnableAutomation();
-
- AfxOleLockApp();
- }
-
- CMsgTracerDoc::~CMsgTracerDoc()
- {
- AfxOleUnlockApp();
- }
-
- BOOL CMsgTracerDoc::OnNewDocument()
- {
- if (!CDocument::OnNewDocument())
- return FALSE;
-
- ((CEditView*)m_viewList.GetHead())->SetWindowText(NULL);
-
- // TODO: add reinitialization code here
- // (SDI documents will reuse this document)
-
- return TRUE;
- }
-
-
-
- /////////////////////////////////////////////////////////////////////////////
- // CMsgTracerDoc serialization
-
- void CMsgTracerDoc::Serialize(CArchive& ar)
- {
- // CEditView contains an edit control which handles all serialization
- ((CEditView*)m_viewList.GetHead())->SerializeRaw(ar);
- }
-
- /////////////////////////////////////////////////////////////////////////////
- // CMsgTracerDoc diagnostics
-
- #ifdef _DEBUG
- void CMsgTracerDoc::AssertValid() const
- {
- CDocument::AssertValid();
- }
-
- void CMsgTracerDoc::Dump(CDumpContext& dc) const
- {
- CDocument::Dump(dc);
- }
- #endif //_DEBUG
-
- /////////////////////////////////////////////////////////////////////////////
- // CMsgTracerDoc commands
-