【VC开源代码栏目提醒】:文章导读:在新的一年中,各位网友都进入紧张的学习或是工作阶段。网学会员整理了VC开源代码-AutoClientDoc.cpp的相关内容供大家参考,祝大家在新的一年里工作和学习顺利!
// AutoClientDoc.cpp : implementation of the CAutoClientDoc class
//
#include "stdafx.h"
#include "AutoClient.h"
#include "AutoClientDoc.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CAutoClientDoc
IMPLEMENT_DYNCREATE(CAutoClientDoc, CDocument)
BEGIN_MESSAGE_MAP(CAutoClientDoc, CDocument)
//{{AFX_MSG_MAP(CAutoClientDoc)
// 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(CAutoClientDoc, CDocument)
//{{AFX_DISPATCH_MAP(CAutoClientDoc)
// 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_IAutoClient to support typesafe binding
// from VBA. This IID must match the GUID that is attached to the
// dispinterface in the .ODL file.
// {3722EC9E-9DDB-11D2-8103-C47F6A784D07}
static const IID IID_IAutoClient =
{ 0x3722ec9e, 0x9ddb, 0x11d2, { 0x81, 0x3, 0xc4, 0x7f, 0x6a, 0x78, 0x4d, 0x7 } };
BEGIN_INTERFACE_MAP(CAutoClientDoc, CDocument)
INTERFACE_PART(CAutoClientDoc, IID_IAutoClient, Dispatch)
END_INTERFACE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CAutoClientDoc construction/destruction
CAutoClientDoc::CAutoClientDoc()
{
// TODO: add one-time construction code here
EnableAutomation();
AfxOleLockApp();
}
CAutoClientDoc::~CAutoClientDoc()
{
AfxOleUnlockApp();
}
BOOL CAutoClientDoc::OnNewDocument()
{
if (!CDocument::OnNewDocument())
return FALSE;
// TODO: add reinitialization code here
// (SDI documents will reuse this document)
return TRUE;
}
/////////////////////////////////////////////////////////////////////////////
// CAutoClientDoc serialization
void CAutoClientDoc::Serialize(CArchive& ar)
{
if (ar.IsStoring())
{
// TODO: add storing code here
}
else
{
// TODO: add loading code here
}
}
/////////////////////////////////////////////////////////////////////////////
// CAutoClientDoc diagnostics
#ifdef _DEBUG
void CAutoClientDoc::AssertValid() const
{
CDocument::AssertValid();
}
void CAutoClientDoc::Dump(CDumpContext& dc) const
{
CDocument::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CAutoClientDoc commands
上一篇:
AutoClient.cpp
下一篇:
数字钟的设计