line.cpp
来自「用VC做的一个画直线和曲线的程序。」· C++ 代码 · 共 41 行
CPP
41 行
// Line.cpp: implementation of the CLine class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "drw.h"
#include "Line.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CLine::CLine()
{
}
CLine::~CLine()
{
}
CLine *CLine::AddLine(CPoint x,CPoint y)
{
m_From=x;
m_To=y;
return this;
}
void CLine::Draw(CDC *pDC)
{
pDC->MoveTo(m_From);
pDC->LineTo(m_To);
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?