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

📄 jfb.cpp

📁 小球打砖块
💻 CPP
字号:
// JFB.cpp: implementation of the JFB class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "mqgGAME.h"
#include "JFB.h"

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

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

JFB::JFB()
{
	Fen=0;
	cr.left=600;
	cr.top=50;
	cr.right=680;
	cr.bottom=80;
}

JFB::~JFB()
{

}

void JFB::Draw(CDC *pDC)
{
	POINT p;
	p.x=p.y=15;
	pDC->RoundRect(&cr,p);
	cr.top=cr.top+5;
	pDC->SetBkColor(RGB(0,255,255));
	pDC->SetTextColor(RGB(255,0,255));
	pDC->DrawText("记分板",&cr,DT_CENTER);
	cr.top=cr.top-5;
	DrawFen(pDC);
	pDC->SetBkColor(RGB(255,255,255));
	pDC->SetTextColor(RGB(0,0,0));
}

void JFB::DrawFen(CDC *pDC)
{
	RECT r;
	SetRect(&r,cr.left,cr.top+32,cr.right,cr.bottom+32);
	pDC->Rectangle(&r);
	r.top=r.top+5;
	CString s;
	s.Format("%d",Fen);
	pDC->DrawText(s,&r,DT_CENTER);
}

void JFB::JiaFen()
{
	Fen=Fen+100;
}

⌨️ 快捷键说明

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