Video DemoView.h
上传用户:smdfuse
上传日期:2015-11-06
资源大小:98k
文件大小:2k
源码类别:

图形图象

开发平台:

Visual C++

  1. // Video DemoView.h : interface of the CVideoDemoView class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_VIDEODEMOVIEW_H__8DD4A9C2_E98D_4CE7_A084_0677588DEB51__INCLUDED_)
  5. #define AFX_VIDEODEMOVIEW_H__8DD4A9C2_E98D_4CE7_A084_0677588DEB51__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. class CVideoDemoView : public CView
  10. {
  11. protected: // create from serialization only
  12. CVideoDemoView();
  13. DECLARE_DYNCREATE(CVideoDemoView)
  14. // Attributes
  15. public:
  16. CVideoDemoDoc* GetDocument();
  17. // Operations
  18. public:
  19. // Overrides
  20. // ClassWizard generated virtual function overrides
  21. //{{AFX_VIRTUAL(CVideoDemoView)
  22. public:
  23. virtual void OnDraw(CDC* pDC);  // overridden to draw this view
  24. virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  25. protected:
  26. virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
  27. virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
  28. virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
  29. //}}AFX_VIRTUAL
  30. // Implementation
  31. public:
  32. virtual ~CVideoDemoView();
  33. #ifdef _DEBUG
  34. virtual void AssertValid() const;
  35. virtual void Dump(CDumpContext& dc) const;
  36. #endif
  37. protected:
  38. // 显示输出缓冲
  39. unsigned char *data;    // 输出数据
  40. int imgWidth,imgHeight; // 输出高度和宽度
  41. bool outputAvailable;   // 输出允许
  42. //位图结构数据
  43. BITMAPINFO bitmapInfo;
  44. // Generated message map functions
  45. protected:
  46. afx_msg void OnFilePrintPreview();
  47. void OnActivateView(BOOL bActivate,CView* pActivateView,CView* pDeactiveView);
  48. public:
  49. void RefreshData();
  50. // Generated message map functions
  51. protected:
  52. //{{AFX_MSG(CVideoDemoView)
  53. // NOTE - the ClassWizard will add and remove member functions here.
  54. //    DO NOT EDIT what you see in these blocks of generated code !
  55. //}}AFX_MSG
  56. DECLARE_MESSAGE_MAP()
  57. };
  58. #ifndef _DEBUG  // debug version in Video DemoView.cpp
  59. inline CVideoDemoDoc* CVideoDemoView::GetDocument()
  60.    { return (CVideoDemoDoc*)m_pDocument; }
  61. #endif
  62. /////////////////////////////////////////////////////////////////////////////
  63. //{{AFX_INSERT_LOCATION}}
  64. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  65. #endif // !defined(AFX_VIDEODEMOVIEW_H__8DD4A9C2_E98D_4CE7_A084_0677588DEB51__INCLUDED_)