DisplayRect.h 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. #if !defined(AFX_DISPLAYRECT_H__82EB3617_68F4_42E2_8E5D_5B7056C7C8A9__INCLUDED_)
  2. #define AFX_DISPLAYRECT_H__82EB3617_68F4_42E2_8E5D_5B7056C7C8A9__INCLUDED_
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif // _MSC_VER > 1000
  6. // DisplayRect.h : header file
  7. //
  8. class CPlayerDlg;
  9. /////////////////////////////////////////////////////////////////////////////
  10. // CDisplayRect dialog
  11. #define WM_DISPLAY_OK WM_USER+35
  12. #define WM_DISPLAY_RECT WM_USER+36
  13. class CDisplayRect : public CDialog
  14. {
  15. // Construction
  16. friend class CPlayerDlg;
  17. public:
  18. CWnd* m_pParent;
  19. CDisplayRect(CWnd* pParent = NULL); // standard constructor
  20. RECT m_rcRect;
  21. RECT m_rcWindow; // window rect
  22. DWORD m_dwOldDeviceNum; // old display device sequence
  23. DWORD m_dwScreenHeight; // screem height
  24. DWORD m_dwScreenWidth; // screen width
  25. public:
  26. BOOL SetDevice(UINT nSeq);
  27. BOOL SetResolution(int nHei, int nWid);
  28. void InitShow();
  29. void Enable(BOOL);
  30. // Dialog Data
  31. //{{AFX_DATA(CDisplayRect)
  32. enum { IDD = IDD_RANGE };
  33. CSliderCtrl m_CtrlZoom;
  34. UINT m_nZoom;
  35. //}}AFX_DATA
  36. afx_msg void DisplayRect(WPARAM wParam, LPARAM lParam);
  37. // Overrides
  38. // ClassWizard generated virtual function overrides
  39. //{{AFX_VIRTUAL(CDisplayRect)
  40. protected:
  41. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  42. //}}AFX_VIRTUAL
  43. // Implementation
  44. protected:
  45. // Generated message map functions
  46. //{{AFX_MSG(CDisplayRect)
  47. virtual void OnOK();
  48. afx_msg void OnDisplay();
  49. virtual BOOL OnInitDialog();
  50. afx_msg void OnMove(int x, int y);
  51. afx_msg void OnPaint();
  52. afx_msg void OnSize(UINT nType, int cx, int cy);
  53. afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI);
  54. afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
  55. afx_msg void OnMouseMove(UINT nFlags, CPoint point);
  56. afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  57. afx_msg void OnDestroy();
  58. //}}AFX_MSG
  59. DECLARE_MESSAGE_MAP()
  60. void SortCtrls();
  61. void DrawRectangle();
  62. void GetFocusRectangle(RECT&);
  63. BOOL PtInFocusRect(POINT);
  64. BOOL PtInVideoRect(POINT);
  65. void SetDisplayRegion();
  66. struct myrect{
  67. POINT CenterPoint;
  68. int nZoom;
  69. int nClientHeight;
  70. int nClientWidth;
  71. };
  72. myrect m_FocusRect;
  73. int m_nVideoHeight;
  74. int m_nVideoWidth;
  75. CPoint m_FocusPoint;
  76. BOOL m_bValid;
  77. POINT m_StandardCenterPoint;
  78. enum state
  79. {
  80. State_Play,
  81. State_Set
  82. }m_state;
  83. };
  84. //{{AFX_INSERT_LOCATION}}
  85. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  86. #endif // !defined(AFX_DISPLAYRECT_H__82EB3617_68F4_42E2_8E5D_5B7056C7C8A9__INCLUDED_)