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.

99 lines
2.8 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: CameraDlg.h
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Header file of CameraDlg.h
  13. //----------------------------------------------------------------------------
  14. #if !defined(AFX_CAMERADLG_H__C2B46349_982E_4FB6_891C_68A54214AA45__INCLUDED_)
  15. #define AFX_CAMERADLG_H__C2B46349_982E_4FB6_891C_68A54214AA45__INCLUDED_
  16. #include "..\DLIB\SensorArray.h" // Added by ClassView
  17. #include "..\DLIB\VideoWnd.h" // Added by ClassView
  18. #if _MSC_VER > 1000
  19. #pragma once
  20. #endif // _MSC_VER > 1000
  21. // CameraDlg.h : header file
  22. //
  23. /////////////////////////////////////////////////////////////////////////////
  24. // CCameraDlg dialog
  25. class CCameraDlg : public CDialog
  26. {
  27. // Construction
  28. public:
  29. LRESULT WindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
  30. void SetSensorArray( CSensorArray *pSensorArray, CVideoWnd *pVideoWnd );
  31. CCameraDlg(CWnd* pParent = NULL); // standard constructor
  32. virtual ~CCameraDlg();
  33. // Dialog Data
  34. //{{AFX_DATA(CCameraDlg)
  35. enum { IDD = IDD_CAMERA_DLG };
  36. CButton m_Lock;
  37. CStatic m_CameraImage;
  38. //}}AFX_DATA
  39. // Overrides
  40. // ClassWizard generated virtual function overrides
  41. //{{AFX_VIRTUAL(CCameraDlg)
  42. public:
  43. virtual BOOL PreTranslateMessage(MSG* pMsg);
  44. protected:
  45. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  46. //}}AFX_VIRTUAL
  47. // Implementation
  48. protected:
  49. // Generated message map functions
  50. //{{AFX_MSG(CCameraDlg)
  51. afx_msg void OnButtonNext();
  52. virtual BOOL OnInitDialog();
  53. afx_msg void OnDestroy();
  54. afx_msg void OnButtonCameraPrev();
  55. afx_msg void OnButtonSnapshot();
  56. afx_msg void OnTimer(UINT nIDEvent);
  57. afx_msg void OnMove(int x, int y);
  58. afx_msg void OnCheckCameraLock();
  59. //}}AFX_MSG
  60. DECLARE_MESSAGE_MAP()
  61. private:
  62. void CheckCamera();
  63. // CVideoWnd m_VideoWnd;
  64. CSensorArray *m_pSensorArray;
  65. struct VIDEO
  66. {
  67. CWnd *pParent;
  68. CVideoWnd *pVideoWnd;
  69. CRect rect;
  70. }m_Video;
  71. int m_CurrentCamera;
  72. BOOL m_bVideoConnected;
  73. private:
  74. void ChangeCamera();
  75. friend LRESULT CALLBACK WindowProcButton( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam )
  76. {
  77. CCameraDlg *pThis = (CCameraDlg*)::GetWindowLong( hWnd, GWL_USERDATA );
  78. if( pThis ) return pThis->WindowProc( hWnd, uMsg, wParam, lParam );
  79. return ::DefWindowProc( hWnd, uMsg, wParam, lParam );
  80. }
  81. WNDPROC m_pWndProc;
  82. };
  83. //{{AFX_INSERT_LOCATION}}
  84. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  85. #endif // !defined(AFX_CAMERADLG_H__C2B46349_982E_4FB6_891C_68A54214AA45__INCLUDED_)