www.pudn.com > TidyWin32-src.zip > ConfigDlg.h


#ifndef CONFIG_DLG_H 
#define CONFIG_DLG_H 
 
#include "resource.h" 
 
class IConfigPage; 
class CTidyProxy; 
 
//------------------------------------------------------------------- 
class CConfigDlg : public CDialogImpl 
{ 
public: 
	enum { IDD = IDD_CONFIG_DLG }; 
	CConfigDlg(CTidyProxy*); 
 
	BOOL IsDialogMsg(LPMSG lpMsg); 
 
private: 
	void ApplySettings(); 
	void UpdateSettings(); 
	void ShowConfigPage(int n); 
 
private: 
	ATLControls::CTabCtrl m_TabCtrl; 
 
	typedef struct ConfPageInfoT { 
		string name; 
		IConfigPage* pConfigPage; 
	} ConfPageInfo; 
	typedef vector ConfPageInfoColl; 
	ConfPageInfoColl m_ConfPageInfo; 
 
	int m_nCurrConfPage; 
 
	CTidyProxy* m_pTidyProxy; 
 
public: 
	LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); 
	LRESULT OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); 
	LRESULT OnApply(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled); 
	LRESULT OnLoadConfig(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled); 
	LRESULT OnSaveAs(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled); 
	LRESULT OnCopyConfig(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled); 
	LRESULT OnResetConfig(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled); 
	LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled); 
 
	LRESULT OnTabSelChange(int idCtrl, LPNMHDR pnmh, BOOL& bHandled); 
 
BEGIN_MSG_MAP(CConfigDlg) 
	MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog) 
	MESSAGE_HANDLER(WM_DESTROY, OnDestroy) 
	COMMAND_ID_HANDLER(IDOK, OnApply) 
	COMMAND_ID_HANDLER(IDC_LOAD_CONFIG, OnLoadConfig) 
	COMMAND_ID_HANDLER(IDC_SAVEAS_CONFIG, OnSaveAs) 
	COMMAND_ID_HANDLER(IDC_COPY_CONFIG, OnCopyConfig) 
	COMMAND_ID_HANDLER(IDC_RESET_CONFIG, OnResetConfig) 
	COMMAND_ID_HANDLER(IDCANCEL, OnCancel) 
 
	NOTIFY_HANDLER(IDC_CONFIG_TAB, TCN_SELCHANGE, OnTabSelChange) 
END_MSG_MAP() 
}; 
 
//------------------------------------------------------------------- 
#endif	// CONFIG_DLG_H