z_z.cpp

来自「用MFC做的简单的俄罗斯方块。功能都已经实现。但是没有考虑算法。希望大家指教。」· C++ 代码 · 共 60 行

CPP
60
字号
// Z_z.cpp: implementation of the Z_z class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "aa.h"
#include "Z_z.h"

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

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

Z_z::Z_z()
{

}

Z_z::~Z_z()
{

}

void Z_z::Draw(CDC *pDC, CDC *pDisplayMemDC)
{
	Drawbutton(x,y,pDC, pDisplayMemDC);
	Drawbutton(x,y-height,pDC, pDisplayMemDC);
	Drawbutton(x-height,y+height,pDC, pDisplayMemDC);
	Drawbutton(x-height,y,pDC, pDisplayMemDC);
}

void Z_z::Draw1(CDC *pDC, CDC *pDisplayMemDC)
{
	Drawbutton(x,y,pDC, pDisplayMemDC);
	Drawbutton(x,y-height,pDC, pDisplayMemDC);
	Drawbutton(x-height,y-height,pDC, pDisplayMemDC);
	Drawbutton(x+height,y,pDC, pDisplayMemDC);
}

void Z_z::Draw2(CDC *pDC, CDC *pDisplayMemDC)
{
	Drawbutton(x,y,pDC, pDisplayMemDC);
	Drawbutton(x,y-height,pDC, pDisplayMemDC);
	Drawbutton(x-height,y+height,pDC, pDisplayMemDC);
	Drawbutton(x-height,y,pDC, pDisplayMemDC);
}

void Z_z::Draw3(CDC *pDC, CDC *pDisplayMemDC)
{
	Drawbutton(x,y,pDC, pDisplayMemDC);
	Drawbutton(x,y-height,pDC, pDisplayMemDC);
	Drawbutton(x-height,y-height,pDC, pDisplayMemDC);
	Drawbutton(x+height,y,pDC, pDisplayMemDC);
}

⌨️ 快捷键说明

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