www.pudn.com > fastplayer-0.1.zip > FiltersDlg.cpp
// FiltersDlg.cpp : implementation file
//
#include "stdafx.h"
#include "FastPlayer.h"
#include "FiltersDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
#include "FastPlayerDoc.h"
/////////////////////////////////////////////////////////////////////////////
// CFiltersDlg dialog
CFiltersDlg::CFiltersDlg(CWnd* pParent /*=NULL*/)
: ETSLayoutDialog(CFiltersDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CFiltersDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
m_pDocument = NULL;
}
void CFiltersDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CFiltersDlg)
DDX_Control(pDX, IDC_FILTER_LIST, m_lstFilters);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CFiltersDlg, ETSLayoutDialog)
//{{AFX_MSG_MAP(CFiltersDlg)
ON_LBN_DBLCLK(IDC_FILTER_LIST, OnDblclkFilterList)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CFiltersDlg message handlers
void CFiltersDlg::OnDblclkFilterList()
{
if (m_pDocument)
{
CString strFilterName;
m_lstFilters.GetText(m_lstFilters.GetCurSel(), strFilterName);
m_pDocument->ShowFilterProperties(strFilterName);
}
}
BOOL CFiltersDlg::OnInitDialog()
{
ETSLayoutDialog::OnInitDialog();
CreateRoot(VERTICAL)
<< (pane(HORIZONTAL, GREEDY)
<< item(IDC_FILTER_LIST, GREEDY));
UpdateLayout();
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}