📄 fivedlg.h
字号:
// FiveDlg.h : header file
//
#if !defined(AFX_FIVEDLG_H__436F8728_5267_11D6_B5E1_E09834AA0408__INCLUDED_)
#define AFX_FIVEDLG_H__436F8728_5267_11D6_B5E1_E09834AA0408__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "AI.h"
#include "SetParamDlg.h"
#include "NetClientDlg.h"
#include "NetServerDlg.h"
#define GAME_END 1
#define GAME_RUN 2
#define SOUND_PUT 10
#define SOUND_WIN 11
#define SOUND_LOSE 12
#define SOUND_CHIMES 13
#define NET_SERVER 100
#define NET_CLIENT 101
/////////////////////////////////////////////////////////////////////////////
// CFiveDlg dialog
class CFiveDlg : public CDialog
{
//attributes
private:
CSetParamDlg m_pSetDlg;
protected:
HICON m_hIcon;
CBrush m_hBKG;
CRect m_rtBoard;
CRect m_rtSelect;
CPen m_penSelect;
CBitmap m_bmpWhite;
CBitmap m_bmpBlack;
int m_nCurrentSide;
int m_PlayerWhite, m_PlayerBlack;
UINT m_nGameStatus;
AI m_ai;
BOOL m_bSelect;
public:
BOOL m_bConnected;
CNetServerDlg m_ServerDlg;
CNetClientDlg m_ClientDlg;
// Construction
public:
CFiveDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CFiveDlg)
enum { IDD = IDD_FIVE_DIALOG };
CAnimateCtrl m_Animate;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CFiveDlg)
public:
virtual BOOL PreTranslateMessage(MSG* pMsg);
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
public:
void DrawBoard();
char PlacePiece(char nSide, int x, int y, BOOL redraw);
protected:
int m_LocalPlayer;
void SoundEffect(int nType);
BOOL CalLogicPos(CPoint point, int &x, int &y);
// Generated message map functions
//{{AFX_MSG(CFiveDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
virtual void OnOK();
virtual void OnCancel();
afx_msg void OnClose();
afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
afx_msg void OnGameExit();
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnOptionsHvh();
afx_msg void OnUpdateActionSurrender(CCmdUI* pCmdUI);
afx_msg void OnUpdateOptionsHvh(CCmdUI* pCmdUI);
afx_msg void OnGameNew();
afx_msg void OnOptionsComputer();
afx_msg void OnUpdateOptionsComputer(CCmdUI* pCmdUI);
afx_msg void OnOptionsHuman();
afx_msg void OnUpdateOptionsHuman(CCmdUI* pCmdUI);
afx_msg void OnActionSurrender();
afx_msg void OnOptionsSettings();
afx_msg void OnHelpAbout();
afx_msg void OnOptionsServer();
afx_msg void OnOptionsClient();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_FIVEDLG_H__436F8728_5267_11D6_B5E1_E09834AA0408__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -