⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 netmsgdoc.cpp

📁 vc++6.0开发网络典型应用实例导航 1. 本光盘提供了本书中所有的实例源程序文件。 2. 附录文件夹下是Winsock 函数参考以及错误码列表
💻 CPP
字号:
// NetmsgDoc.cpp : implementation of the CNetmsgDoc class
//

#include "stdafx.h"
#include "Netmsg.h"

#include "NetmsgDoc.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CNetmsgDoc

IMPLEMENT_DYNCREATE(CNetmsgDoc, CDocument)

BEGIN_MESSAGE_MAP(CNetmsgDoc, CDocument)
	//{{AFX_MSG_MAP(CNetmsgDoc)
		// 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(CNetmsgDoc, CDocument)
	//{{AFX_DISPATCH_MAP(CNetmsgDoc)
		// 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_ITest to support typesafe binding
//  from VBA.  This IID must match the GUID that is attached to the 
//  dispinterface in the .ODL file.

// {BC1B7310-4FBC-435C-80B0-BFEC964A8CF8}
static const IID IID_INetmsg =
{ 0xbc1b7310, 0x4fbc, 0x435c, { 0x80, 0xb0, 0xbf, 0xec, 0x96, 0x4a, 0x8c, 0xf8 } };

BEGIN_INTERFACE_MAP(CNetmsgDoc, CDocument)
	INTERFACE_PART(CNetmsgDoc, IID_INetmsg, Dispatch)
END_INTERFACE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CNetmsgDoc construction/destruction

CNetmsgDoc::CNetmsgDoc()
{
	// TODO: add one-time construction code here
	AfxOleLockApp();

}

CNetmsgDoc::~CNetmsgDoc()
{
	AfxOleUnlockApp();
}

BOOL CNetmsgDoc::OnNewDocument()
{
	if (!CDocument::OnNewDocument())
		return FALSE;
	this->SetTitle("Network Messenger");
	return TRUE;
}



/////////////////////////////////////////////////////////////////////////////
// CNetmsgDoc serialization

void CNetmsgDoc::Serialize(CArchive& ar)
{
	if (ar.IsStoring())
	{
		// TODO: add storing code here
	}
	else
	{
		// TODO: add loading code here
	}
}

/////////////////////////////////////////////////////////////////////////////
// CNetmsgDoc diagnostics

#ifdef _DEBUG
void CNetmsgDoc::AssertValid() const
{
	CDocument::AssertValid();
}

void CNetmsgDoc::Dump(CDumpContext& dc) const
{
	CDocument::Dump(dc);
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CNetmsgDoc commands

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -