GameDlg.h
上传用户:bsw_2008
上传日期:2013-07-09
资源大小:2446k
文件大小:3k
- #if !defined(AFX_GAMEDLG_H__825BE0B3_94A2_43D6_AAEC_717FBA864D56__INCLUDED_)
- #define AFX_GAMEDLG_H__825BE0B3_94A2_43D6_AAEC_717FBA864D56__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- // GameDlg.h : header file
- //
- /////////////////////////////////////////////////////////////////////////////
- // CGameDlg dialog
- #include "TakeGame.h"
- #include "Client.h"
- #include "Wave.h"
- class CGameDlg : public CDialog
- {
- // Construction
- typedef struct MM{
- CString name[4],sex[4],score[4];
- int ID[4];
- };
- public:
- void GameEnd(int direct);
- void PlayResult(char k,POINT from,POINT to);
- void GameBegin();
- void chatMessage(CString str);
- void userMessage();
- MM user;
- CClient *pClient;
- TakeGame game;
- int board[17][17];
- int desk,direct;
- int m_bqh,m_btx,m_bwcdd;
- int right;
- CBrush m_brush;
- CPoint pos_forward,pos_after;
- void Draw();
- CGameDlg(CWnd* pParent = NULL); // standard constructor
- // Dialog Data
- //{{AFX_DATA(CGameDlg)
- enum { IDD = IDD_DIALOG1 };
- CListCtrl m_GamerList;
- CString m_message;
- CString m_strText;
- //}}AFX_DATA
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CGameDlg)
- public:
- virtual void OnFinalRelease();
- protected:
- virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
- //}}AFX_VIRTUAL
- // Implementation
- protected:
- CWave music;
- int m_time;
- void DrawTime(CDC *dc,int num);
- BOOL lsLine;
- void DrawLine(CDC *dc);
- POINT AdverseRotate(POINT p,int dir);
- void play(CPoint p1,CPoint p2);
- void MessageWcdd();
- BOOL change(CPoint p1,CPoint p2);
- int rotateDirect(int i);
- void DrawArrow(int i,int j,int k,CDC *dc);
- CPoint FindPos(int x,int y);
- int FindImage(int k,int dir);
- void DrawChess(CDC *dc);
- // Generated message map functions
- //{{AFX_MSG(CGameDlg)
- afx_msg void OnPaint();
- afx_msg BOOL OnEraseBkgnd(CDC* pDC);
- afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
- virtual BOOL OnInitDialog();
- afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
- afx_msg void OnUpdateMessage();
- afx_msg void OnTimer(UINT nIDEvent);
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- // Generated OLE dispatch map functions
- //{{AFX_DISPATCH(CGameDlg)
- // NOTE - the ClassWizard will add and remove member functions here.
- //}}AFX_DISPATCH
- DECLARE_DISPATCH_MAP()
- DECLARE_INTERFACE_MAP()
- private:
- CBitmap bitmap_right[3],bitmap_up[3],bitmap_down[3],bitmap_left[3],bitmap_arrow;
- CBitmap bitmap_k1,bitmap_k2,bitmap_wcdd,bitmap_qh,bitmap_tx,bitmap_time;
- BITMAP BMap_right[3],BMap_up[3],BMap_down[3],BMap_left[3],BMap_arrow,BMap_k1,BMap_k2;
- BITMAP BMap_wcdd,BMap_qh,BMap_tx,BMap_time;
- };
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
- #endif // !defined(AFX_GAMEDLG_H__825BE0B3_94A2_43D6_AAEC_717FBA864D56__INCLUDED_)