www.pudn.com > Videodisplay.rar > RelationDlg.cpp
// RelationDlg.cpp : implementation file
//
#include "stdafx.h"
#include "Video.h"
#include "RelationDlg.h"
#include "fstream.h"
#include "stdio.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CRelationDlg dialog
CRelationDlg::CRelationDlg(CWnd* pParent /*=NULL*/)
: CDialog(CRelationDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CRelationDlg)
m_strYUVFile = _T("");
m_strRelationFile = _T("");
m_nFrameNum = 16;
yuvFlag=1; //默认为CIF
frameFlag=1; //默认为桢内
//}}AFX_DATA_INIT
}
void CRelationDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CRelationDlg)
DDX_Text(pDX, IDC_YUV_FILE_NAME, m_strYUVFile);
DDX_Text(pDX, IDC_RELATION_FILE_NAME, m_strRelationFile);
DDX_Text(pDX, IDC_FRAME_NUM, m_nFrameNum);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CRelationDlg, CDialog)
//{{AFX_MSG_MAP(CRelationDlg)
ON_BN_CLICKED(IDC_ALL_OK, OnAllOk)
ON_BN_CLICKED(IDC_SELECT_YUV_FILE, OnSelectYuvFile)
ON_BN_CLICKED(IDC_SELECT_RELATION_FILE, OnSelectRelationFile)
ON_BN_CLICKED(IDC_INTRA_RELATION, OnIntraRelation)
ON_BN_CLICKED(IDC_INTER_RELATION, OnInterRelation)
ON_BN_CLICKED(IDC_CIF, OnCif)
ON_BN_CLICKED(IDC_QCIF, OnQcif)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CRelationDlg message handlers
void CRelationDlg::OnAllOk() //最后输入
{
// TODO: Add your control notification handler code here
UpdateData(TRUE);
CDialog::OnCancel();
}
void CRelationDlg::OnSelectYuvFile() //选取YUV文件路径
{
// TODO: Add your control notification handler code here
CFileDialog yuvdlg(TRUE,"yuv","*.yuv"); //打开文件的对话狂
if(yuvdlg.DoModal()==IDOK)
{
m_strYUVFile=yuvdlg.GetPathName();
}
UpdateData(FALSE);
}
void CRelationDlg::OnSelectRelationFile()
{
// TODO: Add your control notification handler code here
CFileDialog relationdlg(FALSE,"txt","*.txt"); //打开文件的对话狂
if(relationdlg.DoModal()==IDOK)
{
m_strRelationFile=relationdlg.GetPathName();
}
UpdateData(FALSE);
}
void CRelationDlg::OnIntraRelation() //桢内
{
frameFlag=1;
}
void CRelationDlg::OnInterRelation() //桢间
{
// TODO: Add your control notification handler code here
frameFlag=2;
}
void CRelationDlg::OnCif()
{
// TODO: Add your control notification handler code here
yuvFlag=1;
}
void CRelationDlg::OnQcif()
{
// TODO: Add your control notification handler code here
yuvFlag=2;
}