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

📄 pkg.cpp

📁 网络编程
💻 CPP
字号:
// Message.cpp : implementation file
//

#include "stdafx.h"
#include "pkg.h"
#include "chatserver.h"

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

/////////////////////////////////////////////////////////////////////////////
// CPkg

IMPLEMENT_DYNCREATE(CPkg, CObject)

CPkg::CPkg()
{
	Init();
}



CPkg::~CPkg()
{
}


/////////////////////////////////////////////////////////////////////////////
// CPkg diagnostics

#ifdef _DEBUG
void CPkg::AssertValid() const
{
	CObject::AssertValid();
}

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

/////////////////////////////////////////////////////////////////////////////
// CPkg serialization

void CPkg::Serialize(CArchive& ar)
{
	if (ar.IsStoring())
	{
		// TODO: add storing code here
		ar << strText ;
		ar << strName ;
		ar << bAway ;
		ar << iMyIcon ;
		ar << bBold ;
		ar << bItalic ;
		ar << bUnderLine ;
		ar << bStrikeOut ;
		ar << clrText ;
		ar << fontName ;
		ar << fontSize ;

		ar << ipAddress;
		ar << port;
		ar << request;
		ar << pSocket;

	}
	else
	{
		// TODO: add loading code here
		ar >> strText ;
		ar >> strName ;
		ar >> bAway ;
		ar >> iMyIcon ;
		ar >> bBold ;
		ar >> bItalic ;
		ar >> bUnderLine ;
		ar >> bStrikeOut ;
		ar >> clrText ;
		ar >> fontName ;
		ar >> fontSize ;

		ar >> ipAddress;
		ar >> port;
		ar >> request;
		ar >> pSocket;
	}
}

/////////////////////////////////////////////////////////////////////////////
// CPkg commands

void CPkg::Init()
{
	strText = "";
	
	strName = "" ;
	bAway = FALSE;
	iMyIcon = 0;
	bBold = FALSE;
	bItalic = FALSE;
	bUnderLine = FALSE;
	bStrikeOut = FALSE;
	clrText = RGB(0,0,0);
	fontName = "Times New Roman";
	fontSize = 10;

	ipAddress = "";
	port = 0;
	request = UNDEFINED;
	pSocket = NULL;
}

⌨️ 快捷键说明

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