#pragma once

#include "ConfigSubDlg.h"
#include "ConfigCommonDlg.h"
#include "ConfigUrlDlg.h"
#include "ConfigProxyDlg.h"
#include "GdStatic.h"


// CConfigDlg 대화 상자입니다.

class CConfigDlg : public CDialog
{
	DECLARE_DYNAMIC(CConfigDlg)

public:
	CConfigDlg(CWnd* pParent = NULL);   // 표준 생성자입니다.
	virtual ~CConfigDlg();

// 대화 상자 데이터입니다.
	enum { IDD = IDD_CONFIG };

private:
	typedef struct {
		UINT    nID;
		CString sCaption;
		CWnd    *pdlg;
	} CONFIG_PAGE_STRUCT, *PCONFIG_PAGE_STRUCT;

	CConfigCommonDlg m_dlgCommon;
	CConfigUrlDlg    m_dlgUrl;
	CConfigProxyDlg  m_dlgProxy;

	CRect m_rcFrame;

	CPtrArray m_paPage;
	int       m_iPage;

public:
	CGdStatic m_stcTitle;
	CTabCtrl  m_tab;

protected:
	void AddPage(CConfigSubDlg &dlg, LPCTSTR pszCaption);
	BOOL ShowPage(int iPage);

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV 지원입니다.

public:
	virtual BOOL OnInitDialog();
	afx_msg void OnSelchangeTb(NMHDR *pNMHDR, LRESULT *pResult);
	afx_msg void OnOk();

	DECLARE_MESSAGE_MAP()
};
