// Video.cpp : implementation file
//

#include "stdafx.h"
#include "CDXCreator.h"
#include "Video.h"

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

/////////////////////////////////////////////////////////////////////////////
// CVideo dialog


CVideo::CVideo(CWnd* pParent /*=NULL*/)
	: CDialog(CVideo::IDD, pParent)
{
	//{{AFX_DATA_INIT(CVideo)
	m_AddVideo = _T("");
	m_LoopVideo = FALSE;
	//}}AFX_DATA_INIT
}


void CVideo::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CVideo)
	DDX_Text(pDX, IDC_VIDEO_EDIT, m_AddVideo);
	DDX_Check(pDX, IDC_LOOPVIDEO_CHECK, m_LoopVideo);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CVideo, CDialog)
	//{{AFX_MSG_MAP(CVideo)
	ON_EN_CHANGE(IDC_VIDEO_EDIT, OnChangeVideoEdit)
	ON_BN_CLICKED(IDC_LOOPVIDEO_CHECK, OnLoopvideoCheck)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CVideo message handlers

void CVideo::OnChangeVideoEdit() 
{
	UpdateData (TRUE);
	if (m_AddVideo=="") { m_LoopVideo=FALSE; UpdateData (FALSE); }
}

void CVideo::OnLoopvideoCheck() 
{
	if (m_AddVideo!="") UpdateData (TRUE);
	else UpdateData (FALSE);
}
