skyblue_PinTuView.h
上传用户:hbrsgg1
上传日期:2014-05-08
资源大小:2826k
文件大小:2k
源码类别:

其他智力游戏

开发平台:

C/C++

  1. /*++
  2. Copyright (c) AFE(Active-Free-Elegance)
  3. Module Name:
  4.     skyblue_PinTuView.h
  5. Abstract:
  6. View , manage drawing 
  7. Author:
  8.     Weijian Luo (Arthur Luo)   15-Jun-2005
  9. E-mail: skybluehacker@yahoo.com.cn
  10. Revision History:      1.0
  11. --*/
  12. #if !defined(AFX_SKYBLUE_PINTUVIEW_H__684CED21_22C8_4B2F_9153_2EE0877713C7__INCLUDED_)
  13. #define AFX_SKYBLUE_PINTUVIEW_H__684CED21_22C8_4B2F_9153_2EE0877713C7__INCLUDED_
  14. #if _MSC_VER > 1000
  15. #pragma once
  16. #endif // _MSC_VER > 1000
  17. //方块位置结构
  18. struct pos
  19. {
  20. int row; //方块所在的行
  21. int col; //方块所在的列
  22. };
  23. class CSkyblue_PinTuView : public CView
  24. {
  25. protected: // create from serialization only
  26. CSkyblue_PinTuView();
  27. DECLARE_DYNCREATE(CSkyblue_PinTuView)
  28. // Attributes
  29. public:
  30. //图像绘制操作组
  31. void DrawCellBlock(CDC *pDC, pos destsite, pos srcsite);
  32. void DrawBlankBlock(CDC *pDC);
  33. void DrawLines(CDC *pDC);
  34. void DrawGameBlocks(CDC *pDC);
  35. //是否程序才开始运行
  36. BOOL m_bFirstRun;
  37. // Operations
  38. public:
  39. // Overrides
  40. // ClassWizard generated virtual function overrides
  41. //{{AFX_VIRTUAL(CSkyblue_PinTuView)
  42. public:
  43. virtual void OnDraw(CDC* pDC);  // overridden to draw this view
  44. virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  45. protected:
  46. virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
  47. //}}AFX_VIRTUAL
  48. // Implementation
  49. public:
  50. virtual ~CSkyblue_PinTuView();
  51. #ifdef _DEBUG
  52. virtual void AssertValid() const;
  53. virtual void Dump(CDumpContext& dc) const;
  54. #endif
  55. protected:
  56. // Generated message map functions
  57. protected:
  58. //{{AFX_MSG(CSkyblue_PinTuView)
  59. afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  60. afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
  61. afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
  62. afx_msg void OnSetFocus(CWnd* pOldWnd);
  63. //}}AFX_MSG
  64. DECLARE_MESSAGE_MAP()
  65. };
  66. #ifndef _DEBUG  // debug version in skyblue_PinTuView.cpp
  67. //inline CSkyblue_PinTuDoc* CSkyblue_PinTuView::GetDocument()
  68.  //  { return (CSkyblue_PinTuDoc*)m_pDocument; }
  69. #endif
  70. /////////////////////////////////////////////////////////////////////////////
  71. //{{AFX_INSERT_LOCATION}}
  72. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  73. #endif // !defined(AFX_SKYBLUE_PINTUVIEW_H__684CED21_22C8_4B2F_9153_2EE0877713C7__INCLUDED_)