?? arrestdlg.h
字號:
// ArrestDlg.h : header file
//
#if !defined(AFX_ARRESTDLG_H__2DFA1050_D56F_4A1C_83CF_FBFEECBF0698__INCLUDED_)
#define AFX_ARRESTDLG_H__2DFA1050_D56F_4A1C_83CF_FBFEECBF0698__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
//////////////////////////////////////////////////////////////////////////
#include <deque>
#include "ARSUtility.h"
#include "ARSField.h"
using namespace std;
#define FIELD_SIZE_SMALL 15 //場地大小初始值
#define iEDGE1 20 //場地邊界大小(20,20,450,450)
#define iEDGE2 450
#define MAX_NUM_PERSON 7 //場地總人數,包括一個賊
//////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// CArrestDlg dialog
class CArrestDlg : public CDialog
{
// Construction
public:
CArrestDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CArrestDlg)
enum { IDD = IDD_ARREST_DIALOG };
CButton m_butStart;
CComboBox m_comPolice6;
CComboBox m_comPolice5;
CComboBox m_comPolice4;
CComboBox m_comPolice1;
CComboBox m_comPolice3;
CComboBox m_comPolice2;
CComboBox m_comThief;
CComboBox m_comboFieldSize;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CArrestDlg)
public:
virtual BOOL PreTranslateMessage(MSG* pMsg);
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CArrestDlg)
virtual BOOL OnInitDialog();
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnSelendokCombofieldsize();
afx_msg void OnButtonreset();
afx_msg void OnButtonstart();
afx_msg void OnSelendokCombopolice1();
afx_msg void OnSelendokCombopolice2();
afx_msg void OnSelendokCombopolice3();
afx_msg void OnSelendokCombopolice4();
afx_msg void OnSelendokCombopolice5();
afx_msg void OnSelendokCombopolice6();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
public:
//畫場地
void DrawField(int iSize);
//由場地坐標轉換為屏幕單元格
CRect XYToRect(int x,int y);
//畫賊
void DrawRound(int x,int y,bool isErased);
//畫警察
void DrawRect(int x,int y,bool isErased);
//由屏幕坐標畫求出場地坐標
bool PointToXY(const CPoint &ptMouse,long &x,long &y);
//畫出所有人的位置
void DrawPerson(bool bErase);
//判定鼠標是否選中人
bool ChoicePerson(const int&x,const int &y,int &choicePerson);
//初始化所有人的位置
void InitPersonPosition();
//顯示當前步數
void ShowStepsStat();
void EnableComboxes(bool bEnable);
void ReadStrategy();
public:
int m_iFieldSize; //場地大小
bool m_bMouseDown; //鼠標是否按下
CPoint m_ptPerson[MAX_NUM_PERSON]; //所有人的場地坐標
int m_iPersonStrategy[MAX_NUM_PERSON];//所有人的策略
bool m_bStartPhase; //開始階段標志
CPoint m_tmpPoint; //臨時點記錄
int m_iPersonNum; //當前人編號
int m_iStepsStat; //移動步數統計
deque <int> m_dqThiefStrategy;
deque<int> m_dqPoliceStrategy;
MOVEDIRECTION m_ThiefMenuDir;
ARSField m_arsField;
bool m_bKeyControl;
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_ARRESTDLG_H__2DFA1050_D56F_4A1C_83CF_FBFEECBF0698__INCLUDED_)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -