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

📄 elsgamedlg.h

📁 俄罗斯方块
💻 H
字号:
// ElsGameDlg.h : header file
//

#if !defined(AFX_ELSGAMEDLG_H__E0BDF24E_FE90_4478_8776_701A70CC2045__INCLUDED_)
#define AFX_ELSGAMEDLG_H__E0BDF24E_FE90_4478_8776_701A70CC2045__INCLUDED_

#include "ElsGame.h"	// Added by ClassView
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "TriangleButton.H"
class CDlgSetFace;
/////////////////////////////////////////////////////////////////////////////
// CElsGameDlg dialog

class CElsGameDlg : public CDialog
{
// Construction
public:
	CString m_strMapPath;
	BOOL m_bBackGround;
	CBrush m_brBack;
	BOOL SaveBitmapToFile(HBITMAP hBitmap, CString lpFileName);
	void DoGameOver();
	void ShowSpecialAward(BOOL isShow);
	BOOL m_bSupportAlpha;
	void ReLoadBitmap();
	int m_nBmpType;
	BOOL m_bSameGraph;
	int m_nCurAlphaDegree;
	void SetWndAlpha(int nAlphaDegree);
	CDlgSetFace* m_pDlgSetFace;
	void ClearArray();
	void DemoStatic(int iColor);
	void MySetTimer();
	void WriteHiScore();
	void ReadHiScore();
	void ShowScore();
	BOOL CheckOver();
	void DrawNextBlock(BOOL bErase);
	int CheckFullLine();
	void CreateNewBlock();
	void InitTheArray();
	void DrawGameFace();
	void DrawTheMap();
	void SetArrayBlockData();
	void RotateBlock();
	BOOL CanRotate(int ix,int iy);
	BOOL CheckCanMove(int nDir);
	void DrawSingleBlock(int initX, int initY, BOOL bErase,int indexBmp);
	void DrawCurBlock(BOOL bErase);
	int m_nCurDir;
	int m_nCurBlock;
	CElsGameDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CElsGameDlg)
	enum { IDD = IDD_ELSGAME_DIALOG };
	CTriangleButton	m_BtnDown;
	CTriangleButton	m_BtnLeft;
	CTriangleButton	m_BtnRight;
	CTriangleButton	m_BtnRotate;
	CString	m_sumLev;
	CString	m_score;
	CString	m_hiscore;
	CString	m_slevel;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CElsGameDlg)
	public:
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult);
	//}}AFX_VIRTUAL

// Implementation
protected:
	CToolBar m_wndToolBar;
	//lpfn m_pSetLayerWindow;
	int AdaptRotatePos();
	int m_nUserSpeed;
	int m_nSpeedLevel;
	int m_nSpeedTime;
	BOOL m_bPause;
	CStatusBarCtrl m_wndStatusBar;
	int m_nHiScore;
	long m_lscore;
	long m_lsumLev;
	BOOL m_bPlaying;
	int m_nCurIndexY;
	int m_nCurIndexX;
	int m_nNextDir;
	int m_nNextBlock;
	int m_nInitY;
	int m_nInitX;
	HICON   m_hIcon;
	int     m_nArray[19][10];
	CPoint  m_nBlockInfoArray[7][4][3];
	CBitmap m_BmpBlock[7];
	int     m_nCurBmpIndex;
	int     m_nNextBmpIndex;
	CRect   m_rcGame;
	CRect   m_rcNext;
	
	// Generated message map functions
	//{{AFX_MSG(CElsGameDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnExit();
	afx_msg void OnStart();
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
	afx_msg void OnAbout();
	afx_msg void OnContents();
	afx_msg void OnPause();
	afx_msg void OnLevel();
	afx_msg void OnStop();
	afx_msg void OnSetface();
	afx_msg void OnBtnrotate();
	afx_msg void OnBtnleft();
	afx_msg void OnBtndown();
	afx_msg void OnBtnright();
	afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
	afx_msg void OnClose();
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnSavebmp();
	afx_msg void OnBackground();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

#endif // !defined(AFX_ELSGAMEDLG_H__E0BDF24E_FE90_4478_8776_701A70CC2045__INCLUDED_)

⌨️ 快捷键说明

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