📄 俄罗斯方块view.h
字号:
// 俄罗斯方块View.h : interface of the CMyView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_VIEW_H__C0897DAB_6B35_4AC0_8E20_DBE0B141CE16__INCLUDED_)
#define AFX_VIEW_H__C0897DAB_6B35_4AC0_8E20_DBE0B141CE16__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#ifndef HONG
#define HONG
#define W_NUMBER 12 //一横排方块的个数
#define H_NUMBER 20 //一竖排方块的个数
#define SIZE 20 //方块的大小
#define BkColor RGB(200,100,200)
#endif
#include "Square.h"
class CMyView : public CView
{
protected: // create from serialization only
CMyView();
DECLARE_DYNCREATE(CMyView)
// Attributes
public:
void Begin(); //初始化程序界面
CMyDoc* GetDocument();
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMyView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
//}}AFX_VIRTUAL
// Implementation
public:
CDC *pDC;
int Elapse; //用于升级,设置时间的频率
Square MySquare;
int Down_Able;
int Time_Number;
bool Runing;
virtual ~CMyView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CMyView)
afx_msg void OnBegin();
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg void OnPause();
afx_msg void OnUpdatePause(CCmdUI* pCmdUI);
afx_msg void OnEnd();
afx_msg void OnAbout();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in 俄罗斯方块View.cpp
inline CMyDoc* CMyView::GetDocument()
{ return (CMyDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_VIEW_H__C0897DAB_6B35_4AC0_8E20_DBE0B141CE16__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -