⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 capture1view.h

📁 利用VFW在USB上捕捉多个静态图片
💻 H
字号:
// capture1View.h : interface of the CCapture1View class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_CAPTURE1VIEW_H__4123945E_0D5F_426B_B6EA_452349AF60A6__INCLUDED_)
#define AFX_CAPTURE1VIEW_H__4123945E_0D5F_426B_B6EA_452349AF60A6__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000


class CCapture1View : public CFormView
{
protected: // create from serialization only
	CCapture1View();
	DECLARE_DYNCREATE(CCapture1View)

public:
	//{{AFX_DATA(CCapture1View)
	enum{ IDD = IDD_CAPTURE1_FORM };
		// NOTE: the ClassWizard will add data members here

	//}}AFX_DATA
    void capture();
    static	UINT video (LPVOID param);
	CCapture2Dlg(CWnd* pParent = NULL);	// standard constructor
     //自定义
	HWND m_hCapWnd;// 预示窗口
	BOOL m_bInit;// 捕捉器初始化
	CAPDRIVERCAPS m_CapDrvCap; // CAPDRIVERCAPS 结构,定义驱动器性能
	CAPSTATUS m_CapStatus; // CAPSTATUS 结构,定义捕捉窗口当前状态
    CAPTUREPARMS m_Parms;  // CAPTURE PARMS 结构,定义捕捉参数
    CString m_CapFileName; // 捕捉文件名称

// Attributes
public:
	CCapture1Doc* GetDocument();
 

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CCapture1View)
	public:
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	virtual void OnInitialUpdate(); // called first time after construct
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
	//}}AFX_VIRTUAL

// Implementation
public:	
	CCapture1Doc* Doc;

	BITMAPFILEHEADER  FileHead;
	BITMAPINFOHEADER  BmpInfo;
	struct{
		char  PathName[100];
	}Bmp;
	LPBYTE lpImage;
	short LoadJpgFile();
	void OnDraw(CDC* pDC);
	short LoadBmpFile();
	virtual ~CCapture1View();


#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CCapture1View)
	afx_msg void OnFileOpen();
	afx_msg void OnStartcap();
	afx_msg void OnFreezed();
	afx_msg void OnSave();
	afx_msg void OnFormat();
	afx_msg void OnSource();
	afx_msg void OnDisconnect();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#ifndef _DEBUG  // debug version in capture1View.cpp
inline CCapture1Doc* CCapture1View::GetDocument()
   { return (CCapture1Doc*)m_pDocument; }
#endif

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_CAPTURE1VIEW_H__4123945E_0D5F_426B_B6EA_452349AF60A6__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -