GameDlg.h
上传用户:bsw_2008
上传日期:2013-07-09
资源大小:2446k
文件大小:3k
源码类别:

棋牌游戏

开发平台:

Visual C++

  1. #if !defined(AFX_GAMEDLG_H__825BE0B3_94A2_43D6_AAEC_717FBA864D56__INCLUDED_)
  2. #define AFX_GAMEDLG_H__825BE0B3_94A2_43D6_AAEC_717FBA864D56__INCLUDED_
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif // _MSC_VER > 1000
  6. // GameDlg.h : header file
  7. //
  8. /////////////////////////////////////////////////////////////////////////////
  9. // CGameDlg dialog
  10. #include "TakeGame.h"
  11. #include "Client.h"
  12. #include "Wave.h"
  13. class CGameDlg : public CDialog
  14. {
  15. // Construction
  16. typedef struct MM{
  17. CString name[4],sex[4],score[4];
  18. int ID[4];
  19. };
  20. public:
  21. void GameEnd(int direct);
  22. void PlayResult(char k,POINT from,POINT to);
  23. void GameBegin();
  24. void chatMessage(CString str);
  25. void userMessage();
  26. MM user;
  27. CClient *pClient;
  28. TakeGame game;
  29. int board[17][17];
  30. int desk,direct;
  31. int m_bqh,m_btx,m_bwcdd;
  32. int right;
  33. CBrush m_brush;
  34. CPoint pos_forward,pos_after;
  35. void Draw();
  36. CGameDlg(CWnd* pParent = NULL);   // standard constructor
  37. // Dialog Data
  38. //{{AFX_DATA(CGameDlg)
  39. enum { IDD = IDD_DIALOG1 };
  40. CListCtrl m_GamerList;
  41. CString m_message;
  42. CString m_strText;
  43. //}}AFX_DATA
  44. // Overrides
  45. // ClassWizard generated virtual function overrides
  46. //{{AFX_VIRTUAL(CGameDlg)
  47. public:
  48. virtual void OnFinalRelease();
  49. protected:
  50. virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  51. //}}AFX_VIRTUAL
  52. // Implementation
  53. protected:
  54. CWave music;
  55. int m_time;
  56. void DrawTime(CDC *dc,int num);
  57. BOOL lsLine;
  58. void DrawLine(CDC *dc);
  59. POINT AdverseRotate(POINT p,int dir);
  60. void play(CPoint p1,CPoint p2);
  61. void MessageWcdd();
  62. BOOL change(CPoint p1,CPoint p2);
  63. int rotateDirect(int i);
  64. void DrawArrow(int i,int j,int k,CDC *dc);
  65. CPoint FindPos(int x,int y);
  66. int FindImage(int k,int dir);
  67. void DrawChess(CDC *dc);
  68. // Generated message map functions
  69. //{{AFX_MSG(CGameDlg)
  70. afx_msg void OnPaint();
  71. afx_msg BOOL OnEraseBkgnd(CDC* pDC);
  72. afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  73. virtual BOOL OnInitDialog();
  74. afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
  75. afx_msg void OnUpdateMessage();
  76. afx_msg void OnTimer(UINT nIDEvent);
  77. //}}AFX_MSG
  78. DECLARE_MESSAGE_MAP()
  79. // Generated OLE dispatch map functions
  80. //{{AFX_DISPATCH(CGameDlg)
  81. // NOTE - the ClassWizard will add and remove member functions here.
  82. //}}AFX_DISPATCH
  83. DECLARE_DISPATCH_MAP()
  84. DECLARE_INTERFACE_MAP()
  85. private:
  86. CBitmap bitmap_right[3],bitmap_up[3],bitmap_down[3],bitmap_left[3],bitmap_arrow;
  87. CBitmap bitmap_k1,bitmap_k2,bitmap_wcdd,bitmap_qh,bitmap_tx,bitmap_time;
  88. BITMAP BMap_right[3],BMap_up[3],BMap_down[3],BMap_left[3],BMap_arrow,BMap_k1,BMap_k2;
  89. BITMAP BMap_wcdd,BMap_qh,BMap_tx,BMap_time;
  90. };
  91. //{{AFX_INSERT_LOCATION}}
  92. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  93. #endif // !defined(AFX_GAMEDLG_H__825BE0B3_94A2_43D6_AAEC_717FBA864D56__INCLUDED_)