www.pudn.com > RecDemo6.0.rar > ConfigDlg.cpp


// ConfigDlg.cpp : implementation file 
// 
 
#include "stdafx.h" 
#include "RecDemo.h" 
#include "ConfigDlg.h" 
 
#ifdef _DEBUG 
#define new DEBUG_NEW 
#undef THIS_FILE 
static char THIS_FILE[] = __FILE__; 
#endif 
 
///////////////////////////////////////////////////////////////////////////// 
// CConfigDlg dialog 
 
 
CConfigDlg::CConfigDlg(CWnd* pParent /*=NULL*/) 
	: CDialog(CConfigDlg::IDD, pParent) 
{ 
	//{{AFX_DATA_INIT(CConfigDlg) 
	GetPrivateProfileString("SYSTEM","m_AGC",NULL,AGCpack,2,"C:\\WINNT\\Tc08a-v.ini"); 
	GetPrivateProfileString("SYSTEM","m_Compress",NULL,Compresspack,2,"C:\\WINNT\\Tc08a-v.ini"); 
    m_Compress=atoi(Compresspack); 
    m_AGC=atoi(AGCpack); 
	//}}AFX_DATA_INIT 
} 
 
 
void CConfigDlg::DoDataExchange(CDataExchange* pDX) 
{ 
	CDialog::DoDataExchange(pDX); 
	//{{AFX_DATA_MAP(CConfigDlg) 
 
	DDX_Radio(pDX, IDC_RADIO_AGC, m_AGC); 
	DDX_Radio(pDX, IDC_RADIO_COMPRESS, m_Compress); 
	//}}AFX_DATA_MAP 
} 
 
 
BEGIN_MESSAGE_MAP(CConfigDlg, CDialog) 
	//{{AFX_MSG_MAP(CConfigDlg) 
	ON_BN_CLICKED(IDC_RADIO_COMPRESS, OnRadioCompress) 
	ON_BN_CLICKED(IDC_RADIO2, OnRadio2) 
	ON_BN_CLICKED(IDC_RADIO_AGC, OnRadioAgc) 
	ON_BN_CLICKED(IDC_RADIO6, OnRadio6) 
	//}}AFX_MSG_MAP 
END_MESSAGE_MAP() 
 
///////////////////////////////////////////////////////////////////////////// 
// CConfigDlg message handlers 
 
void CConfigDlg::OnOK()  
{ 
	// ±£´æÂ¼ÒôÉèÖ㺠
switch(dolly) 
	{ 
	case 0: 
		WritePrivateProfileString ("SYSTEM",  
                              "m_Compress",  
                              "0",  
                              "C:\\WINNT\\Tc08a-v.ini");  
		break; 
	case 1: 
		WritePrivateProfileString ("SYSTEM",  
                              "m_Compress",  
                              "1",  
                              "C:\\WINNT\\Tc08a-v.ini");  
		break;} 
switch(theway) 
	{ 
	case 0: 
	WritePrivateProfileString ("SYSTEM",  
                              "m_AGC",  
                              "0",  
                              "C:\\WINNT\\Tc08a-v.ini");  
		break; 
	case 1: 
			WritePrivateProfileString ("SYSTEM",  
                              "m_AGC",  
                              "1",  
                              "C:\\WINNT\\Tc08a-v.ini");  
		break;} 
CDialog::OnOK(); 
} 
 
void CConfigDlg::OnRadioCompress()  
{ 
	// TODO: Add your control notification handler code here 
dolly=0; 
 
 
} 
 
void CConfigDlg::OnRadio2()  
{ 
	// TODO: Add your control notification handler code here 
dolly=1; 
 
 
} 
 
void CConfigDlg::OnRadioAgc()  
{ 
	// TODO: Add your control notification handler code here 
theway=0; 
 
} 
 
void CConfigDlg::OnRadio6()  
{ 
	// TODO: Add your control notification handler code here 
theway=1; 
	 
 
}