诸暨麻将添加redis
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

88 lines
2.0 KiB

  1. #ifndef CONTROL_WND_HEAD_FILE
  2. #define CONTROL_WND_HEAD_FILE
  3. #pragma once
  4. #include "Stdafx.h"
  5. #include "Resource.h"
  6. #include "GameLogic.h"
  7. //////////////////////////////////////////////////////////////////////////
  8. //消息定义
  9. #define IDM_LISTEN_CARD (WM_USER+300) //扑克操作
  10. #define IDM_CARD_OPERATE (WM_USER+301) //扑克操作
  11. //////////////////////////////////////////////////////////////////////////
  12. //控制窗口
  13. class CControlWnd : public CWnd
  14. {
  15. //配置变量
  16. protected:
  17. BYTE m_cbActionMask; //类型掩码
  18. BYTE m_cbCenterCard; //中心扑克
  19. BYTE m_cbGangCard[5]; //杠牌数据
  20. CPoint m_PointBenchmark; //基准位置
  21. //状态变量
  22. protected:
  23. BYTE m_cbItemCount; //子项数目
  24. BYTE m_cbCurrentItem; //当前子项
  25. //控件变量
  26. protected:
  27. CSkinButton m_btChiHu; //吃胡按钮
  28. CSkinButton m_btListen; //听牌按钮
  29. CSkinButton m_btGiveUp; //放弃按钮
  30. //资源变量
  31. protected:
  32. CBitImage m_ImageControlTop; //资源图片
  33. CBitImage m_ImageControlMid; //资源图片
  34. CBitImage m_ImageControlButtom; //资源图片
  35. CBitImage m_ImageActionExplain; //动作解释
  36. //函数定义
  37. public:
  38. //构造函数
  39. CControlWnd();
  40. //析构函数
  41. virtual ~CControlWnd();
  42. //控件控制
  43. public:
  44. //基准位置
  45. void SetBenchmarkPos(int nXPos, int nYPos);
  46. //设置扑克
  47. void SetControlInfo(BYTE cbCenterCard, BYTE cbActionMask, tagGangCardResult & GangCardResult);
  48. //内部函数
  49. protected:
  50. //调整控件
  51. void RectifyControl();
  52. //消息映射
  53. protected:
  54. //重画函数
  55. afx_msg void OnPaint();
  56. //吃胡按钮
  57. afx_msg void OnChiHu();
  58. //听牌按钮
  59. afx_msg void OnListen();
  60. //放弃按钮
  61. afx_msg void OnGiveUp();
  62. //建立消息
  63. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  64. //鼠标消息
  65. afx_msg void OnLButtonDown(UINT nFlags, CPoint Point);
  66. //光标消息
  67. afx_msg BOOL OnSetCursor(CWnd * pWnd, UINT nHitTest, UINT uMessage);
  68. DECLARE_MESSAGE_MAP()
  69. };
  70. //////////////////////////////////////////////////////////////////////////
  71. #endif