BOOL CVideoOptionsDlg::OnInitDialog()
{
	CDialog::OnInitDialog();
	m_ctrlSliderQuality.SetRange(1, 100, TRUE);
	m_ctrlSliderAdjust.SetRange(1, 100, TRUE);
	m_ctrlSliderAdjust.SetTicFreq(10);
	m_ctrlSliderAdjust.SetPos(m_cOpts.m_iValueAdjust);
	m_ctrlButtonAutoAdjust.SetCheck(m_cOpts.m_bAutoAdjust);

	RefreshAutoOptions();
	LoadICList();
	RefreshCompressorButtons();

	return TRUE; // return TRUE unless you set the focus to a control
	// EXCEPTION: OCX Property Pages should return FALSE
}
void CVideoOptions::OnSelchangeCompressors() 
{
	// TODO: Add your control notification handler code here
	RefreshCompressorButtons(); 
	
}
BOOL CVideoOptions::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	CString fps;
	CString keyframes;
	CString timelp;
	CString qualitystr;
	int quality;

	quality = compquality/100;

	fps.Format("%d",frames_per_second);
	keyframes.Format("%d",keyFramesEvery);
	timelp.Format("%d",timelapse);
	qualitystr.Format("%d",quality);

	((CEdit *) GetDlgItem(IDC_FPS))->SetWindowText(fps);
	((CEdit *) GetDlgItem(IDC_KEYFRAMES))->SetWindowText(keyframes);
	((CEdit *) GetDlgItem(IDC_KEYFRAMES2))->SetWindowText(timelp);
	((CStatic *) GetDlgItem(IDC_QUALITY))->SetWindowText(qualitystr);

	
	((CSliderCtrl *) GetDlgItem(IDC_QUALITY_SLIDER))->SetRange(1,100,TRUE);
	((CSliderCtrl *) GetDlgItem(IDC_QUALITY_SLIDER))->SetPos(quality);


	//Ver 1.2
	autoadjust = g_autoadjust;
	valueadjust = g_valueadjust;

	((CSliderCtrl *) GetDlgItem(IDC_ADJUST))->SetTicFreq( 10 );
	((CSliderCtrl *) GetDlgItem(IDC_ADJUST))->SetRange(1,100,TRUE);	
	
	((CSliderCtrl *) GetDlgItem(IDC_ADJUST))->SetPos(valueadjust);

	((CButton *) GetDlgItem(IDC_AUTO))->SetCheck(autoadjust);
	RefreshAutoOptions(); 

	

	if (num_compressor>0) {

		int sel = -1;
		for (int i=0; i<num_compressor;i++) {

			CString cname(compressor_info[i].szDescription);
			((CComboBox *) GetDlgItem(IDC_COMPRESSORS))->AddString(cname);
			
			if (compfccHandler == compressor_info[i].fccHandler) {

				sel = i;

			}

		}


		if (sel == -1)
		{
				sel = 0;
				compfccHandler = compressor_info[sel].fccHandler;
		}

		
		((CComboBox *) GetDlgItem(IDC_COMPRESSORS))->SetCurSel(sel);

		RefreshCompressorButtons(); 
		
	}	


	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
void CVideoOptionsDlg::OnSelchangeCompressors()
{
	RefreshCompressorButtons();
}