資源簡介
基于C++開發錄屏專家軟件,輕松地將屏幕上的軟件操作過程、網絡教學課件、網絡電視、網絡電影、聊天視頻、游戲精彩瞬間等錄制成AVI動畫,具有長時間錄像并保證聲音完全同步的能力。錄屏專家軟件使用簡單,功能強大,是輔助教學和娛樂錄制的首選。
本設計涉及到屏幕的錄制,保存方式,后期的整合以及音視頻的播放。先建立窗口,設置好屏幕的大小,再用抓圖函數進行截圖,把圖片轉化成設備無關的位圖,并保存為位圖文件;然后定義AVI以及WAV格式;設置文件圖像的位數,大小,關鍵幀,速度,兩幀之間的間隔時間,最后將視頻流,音頻流進行壓縮整合并保存為AVI格式。
代碼片段和文件信息
//?PostProRecoderDlg.cpp?:?實現文件
//
#include?“stdafx.h“
#include?“PostProRecorder.h“
#include?“PostProRecoderDlg.h“
#include
#include“KeyDialog.h“
#include“FindTime.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#endif
#define?START?1
#define?PAUSE?2
#define?STOP??0
//?用于應用程序“關于”菜單項的?CAboutDlg?對話框
class?CAboutDlg?:?public?CDialog
{
public:
CAboutDlg();
//?對話框數據
enum?{?IDD?=?IDD_ABOUTBOX?};
protected:
virtual?void?DoDataExchange(CDataExchange*?pDX);????//?DDX/DDV?支持
//?實現
protected:
DECLARE_MESSAGE_MAP()
};
CAboutDlg::CAboutDlg()?:?CDialog(CAboutDlg::IDD)
{
}
void?CAboutDlg::DoDataExchange(CDataExchange*?pDX)
{
CDialog::DoDataExchange(pDX);
}
BEGIN_MESSAGE_MAP(CAboutDlg?CDialog)
END_MESSAGE_MAP()
//?CPostProRecoderDlg?對話框
CPostProRecoderDlg::CPostProRecoderDlg(CWnd*?pParent?/*=NULL*/)
:?CDialog(CPostProRecoderDlg::IDD?pParent)
{
m_hIcon?=?AfxGetApp()->LoadIcon(IDR_MAINframe);
m_fixTime?=?0;
}
void?CPostProRecoderDlg::DoDataExchange(CDataExchange*?pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Control(pDX?IDC_EDIT1?m_edit);
DDX_Control(pDX?IDC_EDIT2?m_leftPoint1);
DDX_Control(pDX?IDC_EDIT3?m_topPoint1);
DDX_Control(pDX?IDC_EDIT4?m_leftPoint2);
DDX_Control(pDX?IDC_EDIT5?m_topPoint2);
DDX_Control(pDX?IDC_CHECK1?m_showWindow);
DDX_Control(pDX?IDC_CHECK2?m_shutDown);
DDX_Control(pDX?IDC_CHECK3?m_showCursor);
DDX_Control(pDX?IDC_CHECK4?m_checkTime);
DDX_Control(pDX?IDC_EDIT6?m_eHour);
DDX_Control(pDX?IDC_EDIT7?m_eMinute);
DDX_Control(pDX?IDC_EDIT8?m_eSecond);
}
BEGIN_MESSAGE_MAP(CPostProRecoderDlg?CDialog)
ON_WM_SYSCOMMAND()
ON_WM_PAINT()
ON_WM_QUERYDRAGICON()
//}}AFX_MSG_MAP
ON_BN_CLICKED(IDC_BUTTON1?&CPostProRecoderDlg::OnBnClickedStart)
ON_WM_TIMER()
ON_BN_CLICKED(IDC_BUTTON2?&CPostProRecoderDlg::OnBnClickedStop)
ON_BN_CLICKED(IDC_BUTTON3?&CPostProRecoderDlg::OnBnClickedPause)
ON_EN_CHANGE(IDC_EDIT1?&CPostProRecoderDlg::OnEnChangeEdit1)
ON_BN_CLICKED(IDC_BUTTON4?&CPostProRecoderDlg::OnBnClickedPickPoint1)
ON_WM_MBUTTONDOWN()
ON_WM_LBUTTONDOWN()
ON_WM_LBUTTONUP()
ON_BN_CLICKED(IDC_BUTTON5?&CPostProRecoderDlg::OnBnClickedPickPoint2)
ON_WM_MOUSEMOVE()
ON_EN_CHANGE(IDC_EDIT2?&CPostProRecoderDlg::OnEnChangeEdit2)
ON_EN_CHANGE(IDC_EDIT3?&CPostProRecoderDlg::OnEnChangeEdit3)
ON_EN_CHANGE(IDC_EDIT4?&CPostProRecoderDlg::OnEnChangeEdit4)
ON_EN_CHANGE(IDC_EDIT5?&CPostProRecoderDlg::OnEnChangeEdit5)
ON_WM_CLOSE()
ON_COMMAND(ID_32771?&CPostProRecoderDlg::OnExit)
ON_COMMAND(ID_32772?&CPostProRecoderDlg::OnCheckTime)
ON_COMMAND(ID_32773?&CPostProRecoderDlg::OnCheckName)
ON_COMMAND(ID_32774?&CPostProRecoderDlg::OnKey)
ON_BN_CLICKED(IDC_BUTTON6?&CPostProRecoderDlg::OnBnClickedButton6)
ON_WM_CHAR()
ON_WM_KEYUP()
END_MESSAGE_MAP()
//?CPostProRecoderDlg?消息處理程序
BOOL?CPostProRecoderDlg::OnInitDialog()
{
CDialog::OnInitDialog();
//?將“關于...”菜單項添加到系統
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-10-10?18:43??基于C++的錄屏專家軟件\
?????目錄???????????0??2018-10-10?18:45??基于C++的錄屏專家軟件\代碼\
?????目錄???????????0??2018-10-10?18:46??基于C++的錄屏專家軟件\代碼\PostProRecoder\
?????目錄???????????0??2018-03-11?13:40??基于C++的錄屏專家軟件\代碼\PostProRecoder\Debug\
?????文件??????289792??2018-03-09?21:26??基于C++的錄屏專家軟件\代碼\PostProRecoder\Debug\PostProRecoder.exe
?????目錄???????????0??2018-10-10?18:45??基于C++的錄屏專家軟件\代碼\PostProRecoder\PostProRecoder\
?????文件????????5126??2018-03-09?21:15??基于C++的錄屏專家軟件\代碼\PostProRecoder\PostProRecoder\FindTime.cpp
?????文件?????????523??2018-03-09?00:20??基于C++的錄屏專家軟件\代碼\PostProRecoder\PostProRecoder\KeyDialog.cpp
?????文件?????????361??2018-03-09?00:20??基于C++的錄屏專家軟件\代碼\PostProRecoder\PostProRecoder\KeyDialog.h
?????文件??????174560??2018-03-09?20:46??基于C++的錄屏專家軟件\代碼\PostProRecoder\PostProRecoder\PostProRecoder.aps
?????文件????????1751??2018-03-08?22:59??基于C++的錄屏專家軟件\代碼\PostProRecoder\PostProRecoder\PostProRecoder.cpp
?????文件?????????502??2018-03-08?22:59??基于C++的錄屏專家軟件\代碼\PostProRecoder\PostProRecoder\PostProRecoder.h
?????文件????????9186??2018-03-09?20:46??基于C++的錄屏專家軟件\代碼\PostProRecoder\PostProRecoder\PostProRecoder.rc
?????文件????????1427??2018-03-08?22:59??基于C++的錄屏專家軟件\代碼\PostProRecoder\PostProRecoder\PostProRecoder.vcproj.ZX-201611072251.Administrator.user
?????文件????????7328??2018-03-09?19:34??基于C++的錄屏專家軟件\代碼\PostProRecoder\PostProRecoder\PostProRecoder.vcxproj
?????文件???????14104??2018-03-09?20:06??基于C++的錄屏專家軟件\代碼\PostProRecoder\PostProRecoder\PostProRecoderDlg.cpp
?????文件????????2505??2018-03-08?23:32??基于C++的錄屏專家軟件\代碼\PostProRecoder\PostProRecoder\PostProRecoderDlg.h
?????文件????????9713??2018-03-09?21:26??基于C++的錄屏專家軟件\代碼\PostProRecoder\PostProRecoder\PostProRecorder.cpp
?????文件????????2856??2018-03-09?20:54??基于C++的錄屏專家軟件\代碼\PostProRecoder\PostProRecoder\PostProRecorder.h
?????文件????????2889??2018-03-08?22:59??基于C++的錄屏專家軟件\代碼\PostProRecoder\PostProRecoder\ReadMe.txt
?????目錄???????????0??2018-03-08?22:59??基于C++的錄屏專家軟件\代碼\PostProRecoder\PostProRecoder\res\
?????文件???????21630??2018-03-08?22:59??基于C++的錄屏專家軟件\代碼\PostProRecoder\PostProRecoder\res\PostProRecoder.ico
?????文件?????????370??2018-03-08?22:59??基于C++的錄屏專家軟件\代碼\PostProRecoder\PostProRecoder\res\PostProRecoder.rc2
?????文件???????74783??2018-03-09?20:46??基于C++的錄屏專家軟件\代碼\PostProRecoder\PostProRecoder\resource.h
?????文件?????????145??2018-03-08?22:59??基于C++的錄屏專家軟件\代碼\PostProRecoder\PostProRecoder\stdafx.cpp
?????文件????????1030??2018-03-08?22:59??基于C++的錄屏專家軟件\代碼\PostProRecoder\PostProRecoder\targetver.h
?????文件?????????909??2018-03-08?22:59??基于C++的錄屏專家軟件\代碼\PostProRecoder\PostProRecoder.sln
?????文件???????40960??2018-03-08?22:59??基于C++的錄屏專家軟件\代碼\PostProRecoder\PostProRecoder.suo
?????文件???????79872??2018-03-11?13:40??基于C++的錄屏專家軟件\代碼\PostProRecoder\PostProRecoder.v11.suo
?????文件??????????86??2018-03-08?22:59??基于C++的錄屏專家軟件\代碼\PostProRecoder\說明文檔.txt
?????文件???????14096??2018-03-11?13:55??基于C++的錄屏專家軟件\代碼\PostProRecoderDlg.cpp
............此處省略10個文件信息
評論
共有 條評論