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.

143 lines
3.1 KiB

4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. //----------------------------------------------------------------------------
  2. // Laser Guard Ltd.
  3. // Copyright � 2000-2002. All Rights Reserved.
  4. // Version 1.0 09/04/2000
  5. // Last modification: 08/10/2003
  6. // Project Intruder Position Indicator
  7. // SUBSYSTEM: Locator
  8. // FILE: Locator.h
  9. // AUTHOR: Chizhevskiy Sergey
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Header file of class CLocator
  13. //----------------------------------------------------------------------------
  14. #ifndef __LOCATOR__H__INCLUDED__
  15. #define __LOCATOR__H__INCLUDED__
  16. #include "Structs.h"
  17. #include "Profile.h"
  18. #include "Polygon.h"
  19. #include "LgsRadar.h"
  20. // #define CLocator CLgsRadar
  21. /*
  22. class CLocator
  23. {
  24. public:
  25. CLocator();
  26. ~CLocator();
  27. public:
  28. bool ZoneChanged();
  29. void LoadBitmaps(CProfile *pProfile);
  30. void SetDebugMode(bool fDebug);
  31. void SetEditType(INT nType);
  32. void SetEditorMode(bool fEditor);
  33. HWND GetSafeHwnd() const;
  34. bool HasScale(INT n) const;
  35. void SetScale(INT n);
  36. bool Show(bool bShow) const;
  37. bool StoreImage( LPCTSTR pPathName );
  38. void Reset();
  39. bool Create(HWND hWnd, CProfile *pProfile, CPolygons *pPolygons, LPPOINT pPoint = NULL, LPSIZE pSize = NULL);
  40. void AddTarget(const TARGET_DESCRIPTION& td);
  41. void DrawFixedVideo( HDC hDC, RECT& rect, double scale );
  42. public:
  43. HBITMAP GetBitmap() { return m_hBitmap; }
  44. private:
  45. LRESULT OnMouseMove(POINT& pt);
  46. LRESULT OnLButtonDown(POINT pt);
  47. LRESULT OnRButtonDown(POINT pt);
  48. void DrawNorth();
  49. public:
  50. void DrawProgress( LPCTSTR pText, INT nSize );
  51. HWND GetSafeHwnd() { return m_hWnd; }
  52. HWND GetIconSafeHwnd() { return m_hIconWnd; }
  53. private:
  54. double m_Scale;
  55. double m_Range;
  56. POINT m_OldEditPoint;
  57. SIZE m_Size;
  58. CPolygons* m_pPolygons;
  59. CPolygon* m_pCurPolygon;
  60. HCURSOR m_hCursorNormal;
  61. HCURSOR m_hCursorEdit;
  62. HBITMAP m_hBitmap;
  63. HBITMAP m_hBitmapScales[3];
  64. HBITMAP m_hBitmapScalesOld;
  65. HFONT m_hFont;
  66. HDC m_hMemDC1;
  67. HDC m_hMemDC2;
  68. HWND m_hWnd;
  69. INT m_North;
  70. INT m_Type;
  71. bool m_bDebugMode;
  72. bool m_bEditorMode;
  73. bool m_bChanged;
  74. CProfile *m_pProfile;
  75. private:
  76. static LRESULT CALLBACK WndProc_(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
  77. protected:
  78. LRESULT OnWmSize( HWND, WPARAM, LPSIZE );
  79. LRESULT OnWmPaint( HWND, HDC );
  80. LRESULT OnWmCreate( HWND, LPCREATESTRUCT );
  81. LRESULT WndProc( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam );
  82. private:
  83. HWND m_hIconWnd;
  84. };
  85. inline
  86. bool CLocator::ZoneChanged()
  87. {
  88. bool bResult = m_bChanged;
  89. m_bChanged = FALSE;
  90. return bResult;
  91. }
  92. inline
  93. bool CLocator::Show(bool bShow) const
  94. {
  95. ::ShowWindow(m_hWnd, bShow ? SW_SHOW : SW_HIDE);
  96. ::UpdateWindow(m_hWnd);
  97. return true;
  98. }
  99. inline
  100. bool CLocator::HasScale(INT nScale) const
  101. {
  102. return m_hBitmapScales[nScale] != NULL;
  103. }
  104. inline
  105. HWND CLocator::GetSafeHwnd() const
  106. {
  107. return m_hWnd;
  108. }
  109. inline
  110. void CLocator::SetEditType(INT nType)
  111. {
  112. m_Type = nType;
  113. }
  114. inline
  115. void CLocator::SetDebugMode(bool fDebug)
  116. {
  117. m_bDebugMode = fDebug;
  118. }
  119. */
  120. #endif