bottomleft.cpp

来自「mfc的电子元器件系统。可以绘制基本图形。对cdc的初级应用。」· C++ 代码 · 共 53 行

CPP
53
字号
// BottomLeft.cpp: implementation of the CBottomLeft class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "Maze.h"
#include "BottomLeft.h"

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

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
IMPLEMENT_SERIAL(CBottomLeft,CShape,0)

CBottomLeft::CBottomLeft()
{

}

CBottomLeft::~CBottomLeft()
{

}

CBottomLeft::CBottomLeft(CRect rect):CShape(rect)
{

}

void CBottomLeft::Draw(CDC *pDC)
{
	CShape::Draw(pDC);
	CPen* OldPen;
	CPen* NewPen=new CPen(PS_SOLID,4,RGB(255,0,200));
	OldPen=pDC->SelectObject(NewPen);
	CRect rect;
	rect=GetRectTracker();
	pDC->MoveTo((rect.right+rect.left)/2,rect.top);
	pDC->LineTo((rect.right+rect.left)/2,(rect.top+rect.bottom)/2);
	pDC->LineTo(rect.right,(rect.top+rect.bottom)/2);
	pDC->SelectObject(OldPen);
}

void CBottomLeft::Serialize(CArchive &ar)
{
	CShape::Serialize(ar);
}

⌨️ 快捷键说明

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