line.cpp

来自「本文件包包含了大量用VC++开发的应用程序界面」· C++ 代码 · 共 65 行

CPP
65
字号
// Line.cpp: implementation of the CLine class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "TextScroll.h"
#include "Line.h"

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

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

IMPLEMENT_SERIAL(CLine,CObject,0)

CLine::CLine()
{
	m_bResult = TRUE;
}

CLine::~CLine()
{

}

//
//	Stream inserters to write the objects through
//	a CArchive object.
//

//
//	Operator overloads to set the data string.
//
CLine& CLine::operator=(CLine &Line)
{
	m_Line = Line.m_Line;
	return (*this);
}

CArchive& operator<<(CArchive& ar, CLine& Line)
{
const char *CrLf = "\r\n";

	ar.WriteString((LPCSTR) Line.m_Line);
	ar.Write(CrLf, strlen (CrLf));
	return (ar);
}

CArchive& operator>>(CArchive& ar, CLine& Line)
{
	Line.m_bResult = ar.ReadString(Line.m_Line);
	Line.m_Line.FreeExtra ();
	return (ar);
}

CString& CLine::GetData()
{
	return (m_Line);
}

⌨️ 快捷键说明

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