// ConfigShProxyDlg.cpp : ±¸Çö ÆÄÀÏÀÔ´Ï´Ù. // #include "stdafx.h" #include "ConsoleApp.h" #include "ConfigProxyDlg.h" // CConfigProxyDlg ´ëÈ­ »óÀÚÀÔ´Ï´Ù. IMPLEMENT_DYNAMIC(CConfigProxyDlg, CDialog) CConfigProxyDlg::CConfigProxyDlg(CWnd* pParent /*=NULL*/) : CConfigSubDlg(CConfigProxyDlg::IDD, pParent) , m_sHost(_T("")) , m_sPort(_T("")) , m_bUseIEProxy(FALSE) { } CConfigProxyDlg::~CConfigProxyDlg() { } void CConfigProxyDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); DDX_Control(pDX, IDC_EDT_HOST, m_edtHost); DDX_Control(pDX, IDC_EDT_PORT, m_edtPort); DDX_Text(pDX, IDC_EDT_HOST, m_sHost); DDX_Text(pDX, IDC_EDT_PORT, m_sPort); DDX_Check(pDX, IDC_CHK_USE_IEPROXY, m_bUseIEProxy); } BEGIN_MESSAGE_MAP(CConfigProxyDlg, CDialog) ON_BN_CLICKED(IDC_CHK_USE_IEPROXY, OnUseIeproxy) END_MESSAGE_MAP() // CConfigProxyDlg ¸Þ½ÃÁö 󸮱âÀÔ´Ï´Ù. BOOL CConfigProxyDlg::OnInitDialog() { CConfigSubDlg::OnInitDialog(); OnUseIeproxy(); return TRUE; // return TRUE unless you set the focus to a control // ¿¹¿Ü: OCX ¼Ó¼º ÆäÀÌÁö´Â FALSE¸¦ ¹ÝÈ¯ÇØ¾ß ÇÕ´Ï´Ù. } void CConfigProxyDlg::OnUseIeproxy() { UpdateData(TRUE); if (m_bUseIEProxy) { GetDlgItem(IDC_EDT_HOST)->EnableWindow(FALSE); GetDlgItem(IDC_EDT_PORT)->EnableWindow(FALSE); } else { GetDlgItem(IDC_EDT_HOST)->EnableWindow(TRUE); GetDlgItem(IDC_EDT_PORT)->EnableWindow(TRUE); } }