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

📄 linedraw.cpp

📁 VC++6开发指南的源代码第7章-第11章
💻 CPP
字号:
// LineDraw1.cpp: implementation of the CLineDraw1 class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "SDocDemo.h"
#include "LineDraw.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

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

CLineDraw::CLineDraw(int StartX,int StartY,int EndX,int EndY)//构造函数的实现
{
	m_StartX=StartX;
	m_StartY=StartY;
	m_EndX=EndX;
	m_EndY=EndY;
}
void CLineDraw::DrawLine(CDC *pDC)
{
	pDC->MoveTo(m_StartX,m_StartY);//绘制线条
	pDC->LineTo(m_EndX,m_EndY);
}

⌨️ 快捷键说明

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