www.pudn.com > CraftFTP_gb.rar > ConnectWizardPage5.cpp


// ConnectWizardPage5.cpp : implementation file 
// 
 
#include "stdafx.h" 
#include "CraftFTP.h" 
#include "FavoritFolderDlg.h" 
#include "ConnectWizardPage5.h" 
 
#ifdef _DEBUG 
#define new DEBUG_NEW 
#undef THIS_FILE 
static char THIS_FILE[] = __FILE__; 
#endif 
 
///////////////////////////////////////////////////////////////////////////// 
// CConnectWizardPage5 property page 
const DWORD CConnectWizardPage5::m_nHelpIDs[] = 
{ 
	IDC_EDIT_PROFILEPATH,	HIDC_EDIT_PROFILEPATH, 
	IDC_BUTTON_BROWSEPATH,	HIDC_BUTTON_BROWSEPATH, 
	0 , 0 
}; 
 
IMPLEMENT_DYNCREATE(CConnectWizardPage5, CPropertyPageExt) 
 
CConnectWizardPage5::CConnectWizardPage5() : CPropertyPageExt(CConnectWizardPage5::IDD) 
{ 
	//{{AFX_DATA_INIT(CConnectWizardPage5) 
	m_szProfilePath = _T("/"); 
	//}}AFX_DATA_INIT 
} 
 
CConnectWizardPage5::~CConnectWizardPage5() 
{ 
} 
 
void CConnectWizardPage5::DoDataExchange(CDataExchange* pDX) 
{ 
	CPropertyPageExt::DoDataExchange(pDX); 
	//{{AFX_DATA_MAP(CConnectWizardPage5) 
	DDX_Text(pDX, IDC_EDIT_PROFILEPATH, m_szProfilePath); 
	//}}AFX_DATA_MAP 
} 
 
 
BEGIN_MESSAGE_MAP(CConnectWizardPage5, CPropertyPageExt) 
	//{{AFX_MSG_MAP(CConnectWizardPage5) 
	ON_BN_CLICKED(IDC_BUTTON_BROWSEPATH, OnButtonBrowsePath) 
	//}}AFX_MSG_MAP 
END_MESSAGE_MAP() 
 
///////////////////////////////////////////////////////////////////////////// 
// CConnectWizardPage5 message handlers 
 
BOOL CConnectWizardPage5::OnSetActive()  
{ 
	// TODO: Add your specialized code here and/or call the base class 
	CPropertySheet * pSheet = (CPropertySheet*)GetParent(); 
    ASSERT_KINDOF(CPropertySheet, pSheet); 
    pSheet->SetWizardButtons(PSWIZB_BACK|PSWIZB_NEXT); 
 
	return CPropertyPageExt::OnSetActive(); 
} 
 
void CConnectWizardPage5::OnButtonBrowsePath()  
{ 
	// TODO: Add your control notification handler code here 
	UpdateData(); 
 
	CFavoritFolderDlg dlg; 
	dlg.m_szProfilePath = m_szProfilePath; 
 
	if(dlg.DoModal() == IDOK) 
	{ 
		m_szProfilePath = dlg.m_szProfilePath; 
		UpdateData(FALSE); 
	} 
}