📄 扫雷过三关2dlg.h
字号:
// 扫雷过三关2Dlg.h : header file
//
#if !defined(AFX_2DLG_H__A1D23307_93FC_11DA_87F4_00E04C779974__INCLUDED_)
#define AFX_2DLG_H__A1D23307_93FC_11DA_87F4_00E04C779974__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/////////////////////////////////////////////////////////////////////////////
// CMy2Dlg dialog
#include "常数定义.h"
#include "mmsystem.h"
#pragma comment(lib,"winmm.lib")
#include "YourName.h"
class CMy2Dlg : public CDialog
{
public:
CDC cdc1,cdc2; //cdc2用来选入图片cdc1用来在内存中贴图
CBitmap *buttonp,*buttonp2,*bugfood; //按钮图,底图块
CBitmap *map,*numberp; //地图,数字图
CBitmap *backp,*time_scorep; ///背景图,时间分数图
CBitmap *temp; //空位图
BITMAP bm;
CFont newFont; //声明新字体对象
CStdioFile mFile;
CFileException mExcept;
CString S; //储存文本
YourName yn;
public:
int i,j; //循环用
int a,b; //字幕贴图位置及上移步长
short life; //生命
short bug,food; //地雷、食物
short fkind,bkind,gkind; //食物种类、地雷种类、奖品种类
short level; //级别
short mapbutton[GX][GY]; //按钮
short map1[GX][GY]; //地图单元格状态
short mapnb[GX][GY]; //地图数字图数组
short ln,col; //贴图的行、列
int tx,ty; //贴图位置
bool startgame; //开始游戏
bool push,pushsound; //RESTART\SOUND按钮
bool pass,lose,win;
int score,total; //分数统计\总分数统计
int timeadd; //累计时间
int hscore; //纪录分
public:
void Secret();
void WriteScore();
void HighScore();
void Sound(short l_r,int cx,int cy);
void statistics(); //统计
void Bitblt(short tx,short ty,short ln,short col);
void Zd(int tx,int ty); //自动打开空位
void Equit(); //数字计算
void Sj(short level,short bug,short food); //随机
void initialize(short level); //初始化
CMy2Dlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CMy2Dlg)
enum { IDD = IDD_MY2_DIALOG };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMy2Dlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CMy2Dlg)
virtual BOOL OnInitDialog();
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
virtual void OnOK();
virtual void OnCancel();
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
afx_msg void OnDestroy();
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_2DLG_H__A1D23307_93FC_11DA_87F4_00E04C779974__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -