Old fashion design for PC-104
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.

122 lines
3.1 KiB

4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. //----------------------------------------------------------------------------
  2. // Laser Guard Ltd.
  3. // Copyright � 2000-2002. All Rights Reserved.
  4. // Version 1.0 01/01/2000
  5. // Last modification: 13/04/2001
  6. // PROJECT:
  7. // SUBSYSTEM:
  8. // FILE: TroubleWnd.h
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Header file of TroubleWnd.h
  13. //----------------------------------------------------------------------------
  14. #if !defined(AFX_TROUBLEWND_H__18C09119_87C4_11D4_A1F0_0010B55CB330__INCLUDED_)
  15. #define AFX_TROUBLEWND_H__18C09119_87C4_11D4_A1F0_0010B55CB330__INCLUDED_
  16. #if _MSC_VER > 1000
  17. #pragma once
  18. #endif // _MSC_VER > 1000
  19. // TroubleWnd.h : header file
  20. //
  21. #include "..\DLIB\SensorArray.h"
  22. /////////////////////////////////////////////////////////////////////////////
  23. // CTroubleWnd window
  24. struct TROUBLE
  25. {
  26. WORD type;
  27. DWORD data;
  28. COLORREF colors[2];
  29. CHAR pCaption[64];
  30. CHAR pText[256];
  31. };
  32. typedef TROUBLE* LPTROUBLE;
  33. //#define TROUBLE_SOCKET_CREATE 0
  34. #define TROUBLE_BACKUP 1
  35. #define TROUBLE_SM 2
  36. #define TROUBLE_ECS 3
  37. #define TROUBLE_SPRU 4
  38. #define TROUBLE_GPRU_COMMAND 5
  39. class CTroubleWnd : public CWnd
  40. {
  41. enum { BUFFER_GROW_AMOUNT = 256 };
  42. // Construction
  43. public:
  44. CTroubleWnd();
  45. // Attributes
  46. public:
  47. // Operations
  48. public:
  49. // Overrides
  50. // ClassWizard generated virtual function overrides
  51. //{{AFX_VIRTUAL(CTroubleWnd)
  52. public:
  53. virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
  54. //}}AFX_VIRTUAL
  55. // Implementation
  56. public:
  57. void Delete( WORD type, DWORD data );
  58. void Add( WORD type, DWORD data, LPSTR pCaption, LPSTR pText, COLORREF color0, COLORREF color1 );
  59. void Add( TROUBLE &trouble );
  60. void Update();
  61. void SetSensorArray( CSensorArray* pSensorArray );
  62. virtual ~CTroubleWnd();
  63. // Generated message map functions
  64. protected:
  65. //{{AFX_MSG(CTroubleWnd)
  66. afx_msg void OnTimer(UINT nIDEvent);
  67. afx_msg void OnPaint();
  68. afx_msg void OnSize(UINT nType, int cx, int cy);
  69. afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  70. afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
  71. afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
  72. //}}AFX_MSG
  73. DECLARE_MESSAGE_MAP()
  74. private:
  75. CPoint m_Shift;
  76. int m_nSize;
  77. void Paint( CDC *pDC );
  78. CSensorArray *m_pSensorArray;
  79. BOOL m_bInverse;
  80. BOOL m_bRedraw;
  81. int m_nScrollPos;
  82. int m_nScrollPosMax;
  83. int m_nCount;
  84. int m_nCountRowVisibleMax;
  85. int m_nCountColMax;
  86. CZone** m_ppZones;
  87. CZone* m_pZone;
  88. int m_nSensor;
  89. struct OVERLAY
  90. {
  91. CDC DC;
  92. CBitmap Bitmap;
  93. CBitmap *pBitmapOld;
  94. CFont *pFontOld;
  95. CRect Rect;
  96. INT nOldBkMode;
  97. }m_Overlay;
  98. LPTROUBLE m_pTrouble;
  99. int m_nTroubleCount;
  100. int m_nTroubleBufferSize;
  101. };
  102. /////////////////////////////////////////////////////////////////////////////
  103. //{{AFX_INSERT_LOCATION}}
  104. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  105. #endif // !defined(AFX_TROUBLEWND_H__18C09119_87C4_11D4_A1F0_0010B55CB330__INCLUDED_)