📄 across.cpp
字号:
// Across.cpp: implementation of the CAcross class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "Maze.h"
#include "Across.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
IMPLEMENT_SERIAL(CAcross,CShape,0)
CAcross::CAcross()
{}
CAcross::~CAcross()
{}
CAcross::CAcross(CRect rect):CShape(rect)
{}
void CAcross::Serialize(CArchive &ar)
{
CShape::Serialize(ar);
}
void CAcross::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.left,(rect.top+rect.bottom)/2);
pDC->LineTo(rect.right,(rect.top+rect.bottom)/2);
pDC->SelectObject(OldPen);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -