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.

77 lines
1.9 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: 08/10/2003
  6. // PROJECT:
  7. // SUBSYSTEM:
  8. // FILE: AreaWnd.h
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Header file of AreaWnd.h
  13. //----------------------------------------------------------------------------
  14. #ifndef __AREA__WND__H__INCLUDED__
  15. #define __AREA__WND__H__INCLUDED__
  16. #if _MSC_VER > 1000
  17. #pragma once
  18. #endif
  19. #include "..\DLIB\BackgroundDrawThread.h"
  20. #include "..\..\LgLib\LgAux.h"
  21. class CAreaWnd : public CWnd
  22. {
  23. public:
  24. CAreaWnd();
  25. public:
  26. const double GetScale() const { return m_dScale; }
  27. const CLgDPoint& GetShift() const { return m_dpShift; }
  28. public:
  29. void SetScale( double dScale, CLgDPoint *pPoint = NULL );
  30. void SetShift( CLgDPoint dpShift ) { m_dpShift = dpShift; OnChangeViewParams(); }
  31. void SetCenter( CLgDPoint *pDPoint );
  32. public:
  33. //{{AFX_VIRTUAL(CAreaWnd)
  34. //}}AFX_VIRTUAL
  35. public:
  36. void FitAreaToWindow();
  37. BOOL Create( CWnd *pParentWnd, CBackground *pBackground, int x, int y, int nWidth, int nHeight );
  38. virtual ~CAreaWnd();
  39. protected:
  40. //{{AFX_MSG(CAreaWnd)
  41. afx_msg void OnPaint();
  42. afx_msg void OnSize(UINT nType, int cx, int cy);
  43. //}}AFX_MSG
  44. DECLARE_MESSAGE_MAP()
  45. protected:
  46. virtual void OnDraw( CDC *pDC );
  47. virtual LRESULT OnBackgroundDraw( WPARAM, LPARAM );
  48. virtual void OnChangeViewParams();
  49. protected:
  50. CRect GetFitFrame();
  51. CLgDPoint WindowToArea( CPoint* pPoint );
  52. CLgDRect WindowToArea( CRect* pRect );
  53. CPoint AreaToWindow( CLgDPoint* pDPoint );
  54. CRect AreaToWindow( CLgDRect* pRect );
  55. protected:
  56. CBackground *m_pBackground;
  57. CBackgroundDrawThread m_BackgroundDrawThread;
  58. CLgMemoryDC m_BackgroundDC;
  59. double m_dScale;
  60. CLgDPoint m_dpShift;
  61. };
  62. //{{AFX_INSERT_LOCATION}}
  63. #endif