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

📄 videocapwnd.cpp

📁 实时视频跟踪源码
💻 CPP
字号:
// VideoCapWnd.cpp : implementation file
//

#include "stdafx.h"
#include "Tracker.h"
#include "VideoCapWnd.h"

// CVideoCapWnd

IMPLEMENT_DYNAMIC(CVideoCapWnd, CWnd)
CVideoCapWnd::CVideoCapWnd()
{
    dwNameLen = 1024;
    dwVerLen = 1024;
}

CVideoCapWnd::~CVideoCapWnd()
{
}


BEGIN_MESSAGE_MAP(CVideoCapWnd, CWnd)
END_MESSAGE_MAP()



// CVideoCapWnd message handlers

void CVideoCapWnd::CreateCaptureWindow(CString &strName, DWORD dwStyle, const CRect &rect, CWnd *wndParent, int nID)
{
    m_hWnd = capCreateCaptureWindow(strName.GetBuffer(), dwStyle, rect.left, rect.right, rect.Width(), rect.Height(), wndParent->m_hWnd, nID);
}

BOOL CVideoCapWnd::GetDriverDescription(DWORD dwIndex, CString &strName, CString &strVer)
{
    BOOL ret = capGetDriverDescription(dwIndex, strName.GetBufferSetLength(dwNameLen), dwNameLen, strVer.GetBufferSetLength(dwVerLen), dwVerLen);
    strName.ReleaseBuffer();
    strVer.ReleaseBuffer();
    return ret;
}

BOOL CVideoCapWnd::GetStatus(CAPSTATUS *lpStat, DWORD size)
{
    return capGetStatus(m_hWnd, lpStat, size);
}

BOOL CVideoCapWnd::DriverConnect(DWORD dwIndex)
{
    return capDriverConnect(m_hWnd, dwIndex);
}

BOOL CVideoCapWnd::DriverDisconnect()
{
    return capDriverDisconnect(m_hWnd);
}

BOOL CVideoCapWnd::DriverGetCaps(CAPDRIVERCAPS *lpCaps, DWORD size)
{
    return capDriverGetCaps(m_hWnd, lpCaps, size);
}

BOOL CVideoCapWnd::CaptureGetSetup(CAPTUREPARMS *lpParms, DWORD size)
{
    return capCaptureGetSetup(m_hWnd, lpParms, size);
}

BOOL CVideoCapWnd::CaptureSetSetup(CAPTUREPARMS *lpParms, DWORD size)
{
    return capCaptureSetSetup(m_hWnd, lpParms, size);
}

BOOL CVideoCapWnd::CaptureStop()
{
    return capCaptureStop(m_hWnd);
}

BOOL CVideoCapWnd::CaptureSequence()
{
    return capCaptureSequence(m_hWnd);
}

BOOL CVideoCapWnd::CaptureAbort()
{
    return capCaptureAbort(m_hWnd);
}

BOOL CVideoCapWnd::PreviewRate(DWORD rate)
{
    return capPreviewRate(m_hWnd, rate);
}

BOOL CVideoCapWnd::PreviewScale(BOOL scale)
{
    return capPreviewScale(m_hWnd, scale);
}

BOOL CVideoCapWnd::Preview(BOOL preview)
{
    return capPreview(m_hWnd, preview);
}

BOOL CVideoCapWnd::FileSaveDIB(CString &file)
{
    return capFileSaveDIB(m_hWnd, file.GetBuffer());
}

BOOL CVideoCapWnd::FileSetCaptureFile(CString &file)
{
    return capFileSetCaptureFile(m_hWnd, file.GetBuffer());
}

BOOL CVideoCapWnd::DlgVideoSource()
{
    return capDlgVideoSource(m_hWnd);
}

BOOL CVideoCapWnd::DlgVideoFormat()
{
    return capDlgVideoFormat(m_hWnd);
}

BOOL CVideoCapWnd::DlgVideoDisplay()
{
    return capDlgVideoDisplay(m_hWnd);
}

BOOL CVideoCapWnd::SetCallbackOnFrame(FrameCallback fpProc)
{
    return capSetCallbackOnFrame(m_hWnd, fpProc);
}

⌨️ 快捷键说明

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