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

📄 tetrisview.h

📁 一个很好的俄罗斯方块游戏
💻 H
字号:
// TetrisView.h : interface of the CTetrisView class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_TETRISVIEW_H__95B14D60_C356_4090_BC4D_1FC1B1FF9F00__INCLUDED_)
#define AFX_TETRISVIEW_H__95B14D60_C356_4090_BC4D_1FC1B1FF9F00__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "Game.h"

class CTetrisView : public CView
{
protected: // create from serialization only
	CTetrisView();
	DECLARE_DYNCREATE(CTetrisView)


// Attributes
public:
	CTetrisDoc* GetDocument();
	bool game_music;

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CTetrisView)
	public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	protected:
	//}}AFX_VIRTUAL

// Implementation
public:
	void Initial();
    CGame Game;
	BOOL m_bPause;
	CDC* m_pMemDC;		//内存DC
	CDC* m_pInitialMemDC;	//
	CBitmap* m_pBitmap;		//存放上一次移动时的外观
	CBitmap* m_pInitialBitmap;	//存放游戏未开始时的外观
	CRect GameRect;
	virtual ~CTetrisView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:
	BOOL m_bStart;

// Generated message map functions
protected:
	//{{AFX_MSG(CTetrisView)
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnGameStart();
	afx_msg void OnGamePause();
	afx_msg void OnUpdateGamePause(CCmdUI* pCmdUI);
	afx_msg void OnExit();
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnSetMusic();
	afx_msg void OnUpdateSetMusic(CCmdUI* pCmdUI);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in TetrisView.cpp
inline CTetrisDoc* CTetrisView::GetDocument()
   { return (CTetrisDoc*)m_pDocument; }
#endif

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_TETRISVIEW_H__95B14D60_C356_4090_BC4D_1FC1B1FF9F00__INCLUDED_)

⌨️ 快捷键说明

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