background.h
来自「it s a small game we can play it for fun」· C头文件 代码 · 共 40 行
H
40 行
//-----------------------------------------------------------------
// Background Object
// C++ Header - Background.h
//-----------------------------------------------------------------
#pragma once
//-----------------------------------------------------------------
// Include Files
//-----------------------------------------------------------------
#include <windows.h>
#include "Bitmap.h"
//-----------------------------------------------------------------
// Background Class
//-----------------------------------------------------------------
class Background
{
protected:
// Member Variables
int m_iWidth, m_iHeight;
COLORREF m_crColor;
Bitmap* m_pBitmap;
public:
// Constructor(s)/Destructor
Background(int iWidth, int iHeight, COLORREF crColor);
Background(Bitmap* pBitmap);
virtual ~Background();
// General Methods
virtual void Update();
virtual void Draw(HDC hDC);
// Accessor Methods
int GetWidth() { return m_iWidth; };
int GetHeight() { return m_iHeight; };
};
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?