www.pudn.com > ImageCheck.rar > CaiDX.h
#if !defined(AFX_CAIDX_H__CD778F67_1439_47B4_B21D_92717101F379__INCLUDED_) #define AFX_CAIDX_H__CD778F67_1439_47B4_B21D_92717101F379__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 // CaiDX.h : header file // #include#include #include ///////////////////////////////////////////////////////////////////////////// // CCaiDX window #define SAFE_RELEASE(x) { if (x) x->Release(); x = NULL; } class CCaiDX : public CWnd { // Construction public: CCaiDX(); // Attributes public: // Operations public: // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CCaiDX) //}}AFX_VIRTUAL // Implementation public: BOOL GetImage(BYTE** pBuf,LONG& nWidth,LONG& nHeight,int& nBitCount); BOOL CreateVideoFilter(CString strDeviceName, IBaseFilter **pCap); void StopPreview(); BOOL StartPreview(); virtual ~CCaiDX(); // Generated message map functions protected: BOOL SetPreviewWindow(); //{{AFX_MSG(CCaiDX) afx_msg void OnPaint(); afx_msg void OnSize(UINT nType, int cx, int cy); //}}AFX_MSG DECLARE_MESSAGE_MAP() //预览和采集 Builder CComPtr< IGraphBuilder > m_pGraph; CComPtr< ISampleGrabber > m_pGrabber; CComPtr< ICaptureGraphBuilder2 > m_pBuilder; //视频采集设备对象 CComPtr< IBaseFilter > m_pCapVideo; BOOL m_bIsPreviewing; CRect m_rtPreview; }; ///////////////////////////////////////////////////////////////////////////// //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_CAIDX_H__CD778F67_1439_47B4_B21D_92717101F379__INCLUDED_)