// DlgTran.cpp : implementation file
//

#include "stdafx.h"
#include "VideoEdit.h"
#include "DlgTran.h"

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

/////////////////////////////////////////////////////////////////////////////
// CDlgTran dialog


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


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


BEGIN_MESSAGE_MAP(CDlgTran, CDialog)
	//{{AFX_MSG_MAP(CDlgTran)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDlgTran message handlers

BOOL CDlgTran::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	
	int iCount=m_pParent->m_VideoEdit.GetTransitions().GetCount();


	CString strTran;
	for(int i=0; i< iCount; i++)
	{
		strTran= m_pParent->m_VideoEdit.GetTransitions().FindTransitionName(i);
		m_List.AddString(strTran);
	}



	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CDlgTran::OnOK() 
{
	// TODO: Add extra validation here
	
	m_iSelTran=m_List.GetCurSel();

    m_List.GetText(m_iSelTran,m_strTranName);


	CDialog::OnOK();
}
