// AssocFiles.cpp : implementation file
//

#include "stdafx.h"
//#include "aplstepmgr.h"
#include "AssocFiles.h"

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

/////////////////////////////////////////////////////////////////////////////
// CAssocFiles dialog


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


void CAssocFiles::DoDataExchange(CDataExchange* pDX)
{
	CaplResizableDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CAssocFiles)
	DDX_Control(pDX, IDC_ASSFCD_VIEW_FILE, m_cViewFile);
	DDX_Control(pDX, IDC_ASSFCD_SAVE_FILE, m_cSaveFile);
	DDX_Control(pDX, IDC_ASSFCD_DELETE_FILE, m_cDelFile);
	DDX_Control(pDX, IDC_ASSFCD_ADD_FILE, m_cAddFile);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CAssocFiles, CaplResizableDialog)
	//{{AFX_MSG_MAP(CAssocFiles)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

void CAssocFiles::SetAnchors()
{
	AddAnchor(IDC_ASSFCD_ADD_FILE,TOP_RIGHT);
	AddAnchor(IDC_ASSFCD_DELETE_FILE,TOP_RIGHT);
	AddAnchor(IDC_ASSFCD_VIEW_FILE,TOP_RIGHT);
	AddAnchor(IDC_ASSFCD_SAVE_FILE,TOP_RIGHT);
	
	AddAnchor(IDC_ASSFCD_FILE_LIST,TOP_LEFT,BOTTOM_RIGHT);
}

/////////////////////////////////////////////////////////////////////////////
// CAssocFiles message handlers

BOOL CAssocFiles::OnInitDialog() 
{
	CaplResizableDialog::OnInitDialog();

	ModifyStyleEx(0, WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE | WS_EX_CONTROLPARENT);   
	ModifyStyle(0, WS_MAXIMIZEBOX);   
	
	m_cAddFile.SetTooltipText( APL_T("Добавить файл..."));
	m_cAddFile.SetIcon(GetAplTableIco(APL_TABLE_NEW));
	m_cDelFile.SetTooltipText( APL_T("Удалить файл..."));
	m_cDelFile.SetIcon(GetAplTableIco(APL_TABLE_DEL));
	m_cSaveFile.SetIcon(GetAplTableIco(APL_TABLE_SAVE));
	m_cSaveFile.SetTooltipText( APL_T(" Сохранить файл..."));
	m_cViewFile.SetTooltipText( APL_T("Просмотреть файл"));
	m_cViewFile.SetIcon(GetAplTableIco(APL_TABLE_VIEW));
	
	return TRUE;  
}
