#pragma once
#include "afxcmn.h"

#include "ConfigSubDlg.h"
#include "Config1Dlg.h"
#include "Config2Dlg.h"
#include "Config3Dlg.h"
#include "RegUtil.h"

class CConfigPage
{
public:
	UINT          m_nID;
	CString       m_sCaption;
	CConfigSubDlg *m_pdlg;
};


// CConfigDlg 대화 상자입니다.

class CConfigDlg : public CDialog
{
	DECLARE_DYNAMIC(CConfigDlg)

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

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

protected:
	CConfig1Dlg m_dlg1;
	CConfig2Dlg m_dlg2;
	CConfig3Dlg m_dlg3;

	CRect m_rcFrame;

	std::vector<CConfigPage*> m_dlgVec;

	int m_iPage;

	CRegUtil m_regutil;

public:
	CTabCtrl m_tab;

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

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

	DECLARE_MESSAGE_MAP()

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