#include "stdafx.h"
#include "VideoAdvCustomEditPage.h"
#include "SystemConfiguration.h"
#include "Helpers.h"

// include resource IDs of english version, for all other languages the IDs MUST BE THE SAME!!!
#include "..\FarCryConfigEng\resource.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#endif



IMPLEMENT_DYNAMIC( CVideoAdvCustomEditPage, CPropertyPage )



CVideoAdvCustomEditPage::CVideoAdvCustomEditPage( const CVarVector& colCVars, CSystemConfiguration& kSysConfig )
: CPropertyPage( IDD_VIDEOADVCUSTOMEDITPAGE )
, m_kCVarDescCtrl()
, m_kCVarListCtrl( colCVars, kSysConfig, m_kCVarDescCtrl )
{
	m_psp.dwFlags &= ~PSH_HASHELP;
}



CVideoAdvCustomEditPage::~CVideoAdvCustomEditPage()
{
}



void CVideoAdvCustomEditPage::DoDataExchange( CDataExchange* pDX )
{
	CPropertyPage::DoDataExchange( pDX );
	DDX_Control( pDX, IDC_CVARLIST, m_kCVarListCtrl );
	DDX_Control( pDX, IDC_CVARDESC, m_kCVarDescCtrl );
}



BEGIN_MESSAGE_MAP( CVideoAdvCustomEditPage, CPropertyPage )
END_MESSAGE_MAP()



BOOL 
CVideoAdvCustomEditPage::OnInitDialog()
{
	CPropertyPage::OnInitDialog();
	
	m_kCVarListCtrl.Initialize();

	return( TRUE );  
}



void 
CVideoAdvCustomEditPage::UpdateSystemConfig()
{
	m_kCVarListCtrl.UpdateSystemConfig();
}