• 大小: 407KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-28
  • 语言: C/C++
  • 标签: 屏幕录像  

资源简介

在屏幕录像模块的主窗体中,用户可以设置录像文件名和存储位置,并可以进行录像和抓图,还可以对已有录像文件进行播放、重命名、另存为、查看时间和删除等操作。打开“录像合成”窗口,如图1.3所示。单击“加入”按钮向列表中插入录像文件,然后单击“合成”按钮将文件组合到一起

资源截图

代码片段和文件信息

// CoalitionDlg.cpp : implementation file
//

#include “stdafx.h“
#include “Kinescope.h“
#include “CoalitionDlg.h“

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CCoalitionDlg dialog


CCoalitionDlg::CCoalitionDlg(CWnd* pParent /*=NULL*/)
: CDialog(CCoalitionDlg::IDD pParent)
{
//{{AFX_DATA_INIT(CCoalitionDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}


void CCoalitionDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CCoalitionDlg)
DDX_Control(pDX IDC_LIST1 m_List);
//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CCoalitionDlg CDialog)
//{{AFX_MSG_MAP(CCoalitionDlg)
ON_BN_CLICKED(IDC_BUTADD OnButadd)
ON_BN_CLICKED(IDC_BUTCOALITION OnButcoalition)
ON_BN_CLICKED(IDC_BUTDEL OnButdel)
ON_BN_CLICKED(IDC_BUTCLEAR OnButclear)
ON_BN_CLICKED(IDC_BUTUP OnButup)
ON_BN_CLICKED(IDC_BUTDOWN OnButdown)
ON_BN_CLICKED(IDC_BUTEXIT OnButexit)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CCoalitionDlg message handlers

void CCoalitionDlg::OnButadd() 
{
// TODO: Add your control notification handler code here
if(m_List.GetCount()==10)
{
MessageBox(“一次只能合成10个文件“);
return;
}
CFileDialog dlg(TRUENULLNULLOFN_HIDEREADONLY|OFN_OVERWRITEPROMPT
“(*.avi)|*.avi| |“AfxGetMainWnd());
CString strPath;
if(dlg.DoModal() == IDOK)
{
strPath = dlg.GetPathName();
if(strPath.Right(4) != “.avi“)
strPath += “.avi“;
}
m_List.InsertString(m_List.GetCount()strPath);
}

void CCoalitionDlg::OnButcoalition() 
{
// TODO: Add your control notification handler code here
CFileDialog dlg(FALSENULLNULLOFN_HIDEREADONLY|OFN_OVERWRITEPROMPT
“(*.avi)|*.avi| |“AfxGetMainWnd());
CString strPathstrText=““;
if(dlg.DoModal() == IDOK)
{
strPath = dlg.GetPathName();
if(strPath.Right(4) != “.avi“)
strPath += “.avi“;
}
PAVISTREAM ps; 
PAVISTREAM pstream[20]; 
PAVISTREAM pComStream;
AVISTREAMINFO strhdr;
PAVIFILE pfile[20];
HRESULT hr; 
int m_Start=0m_Stop=0;
PAVIFILE pfileto;
AVICOMPRESSOPTIONS pCompressOption;   
AVICOMPRESSOPTIONS FAR * opts[1] = {&pCompressOption};  
int nframes = 0;
AVIFileInit(); //初始化AVIFile函数库
CString m_Name;
m_List.GetText(0m_Name);
AVIFileOpen(&pfile[0]m_NameOF_READ NULL); //打开源文件
AVIFILEINFO pfinfo;
AVIFileInfo(pfile[0]&pfinfosizeof(AVIFILEINFO)); 
AVIFileGetStream(pfile[0] &pstream[0] streamtypeVIDEO 0 ); //获取视频流
//获取流信息
AVISTREAMINFO streaminfo;
AVIStreamInfo(pstream[0]&streaminfosizeof(AVISTREAMINFO));
PGETframe pframe; //定义帧接口对象
pframe=AVIStreamGetframeOpen(pstream[0]NULL); //在流中打开帧
m_Start = AVIStreamStart(pstream[0]); //获取流的起始帧
m_Stop = AVIStreamLength(pstream[0]); //获

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       7198  2008-09-19 10:04  Kinescope\CoalitionDlg.cpp

     文件       1391  2008-09-08 16:11  Kinescope\CoalitionDlg.h

     文件      11397  2008-09-19 10:04  Kinescope\CutDlg.cpp

     文件       1693  2008-09-08 15:01  Kinescope\CutDlg.h

     文件       3637  2008-09-04 13:40  Kinescope\frameDlg.cpp

     文件       1335  2008-09-04 13:40  Kinescope\frameDlg.h

     文件    2541060  2009-03-09 15:41  Kinescope\Kinescope.aps

     文件       3860  2009-12-04 11:19  Kinescope\Kinescope.clw

     文件       2105  2008-06-25 09:07  Kinescope\Kinescope.cpp

     文件       5264  2008-09-08 17:58  Kinescope\Kinescope.dsp

     文件        541  2008-06-25 09:07  Kinescope\Kinescope.dsw

     文件       1357  2008-06-25 09:07  Kinescope\Kinescope.h

     文件      74752  2009-12-04 11:19  Kinescope\Kinescope.ncb

     文件     652288  2009-12-04 11:19  Kinescope\Kinescope.opt

     文件       3055  2009-10-13 18:00  Kinescope\Kinescope.plg

     文件       9932  2008-09-18 19:02  Kinescope\Kinescope.rc

     文件      29030  2008-09-19 08:39  Kinescope\KinescopeDlg.cpp

     文件       3174  2008-09-08 16:50  Kinescope\KinescopeDlg.h

     文件       1103  2008-06-28 14:38  Kinescope\NameDlg.cpp

     文件       1189  2008-06-28 14:38  Kinescope\NameDlg.h

     文件       3633  2008-06-25 09:07  Kinescope\ReadMe.txt

     文件        211  2008-06-25 09:07  Kinescope\StdAfx.cpp

     文件       1161  2008-09-08 08:50  Kinescope\StdAfx.h

     文件       3034  2008-09-08 15:19  Kinescope\resource.h

     文件     279382  2008-07-12 10:27  Kinescope\res\Kinescope.ico

     文件        401  2008-06-25 09:07  Kinescope\res\Kinescope.rc2

    ..A..H.     24064  2008-09-22 15:17  Kinescope\res\Thumbs.db

     文件     279382  2008-07-12 08:28  Kinescope\res\停止.ico

     文件     279382  2008-07-12 09:34  Kinescope\res\剪切.ico

     文件     279382  2008-07-12 08:30  Kinescope\res\合成.ico

............此处省略10个文件信息

评论

共有 条评论