www.pudn.com > CraftFTP_gb.rar > ConnectWizardPage3.cpp
// ConnectWizardPage3.cpp : implementation file
//
#include "stdafx.h"
#include "CraftFTP.h"
#include "ConnectWizardPage3.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CConnectWizardPage3 property page
const DWORD CConnectWizardPage3::m_nHelpIDs[] =
{
IDC_EDIT_HOSTNAME, HIDC_EDIT_HOSTNAME,
0 , 0
};
IMPLEMENT_DYNCREATE(CConnectWizardPage3, CPropertyPageExt)
CConnectWizardPage3::CConnectWizardPage3() : CPropertyPageExt(CConnectWizardPage3::IDD)
{
//{{AFX_DATA_INIT(CConnectWizardPage3)
m_szHostName = _T("");
//}}AFX_DATA_INIT
}
CConnectWizardPage3::~CConnectWizardPage3()
{
}
void CConnectWizardPage3::DoDataExchange(CDataExchange* pDX)
{
CPropertyPageExt::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CConnectWizardPage3)
DDX_Text(pDX, IDC_EDIT_HOSTNAME, m_szHostName);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CConnectWizardPage3, CPropertyPageExt)
//{{AFX_MSG_MAP(CConnectWizardPage3)
ON_EN_CHANGE(IDC_EDIT_HOSTNAME, OnChangeEditHostname)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CConnectWizardPage3 message handlers
BOOL CConnectWizardPage3::OnSetActive()
{
// TODO: Add your specialized code here and/or call the base class
//¸üÐÂ״̬
OnChangeEditHostname();
return CPropertyPageExt::OnSetActive();
}
void CConnectWizardPage3::OnChangeEditHostname()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CPropertyPageExt::OnInitDialog()
// function and call CRichEditCtrl().SetEventMask()
// with the ENM_CHANGE flag ORed into the mask.
// TODO: Add your control notification handler code here
UpdateData();
CPropertySheet * pSheet = (CPropertySheet*)GetParent();
ASSERT_KINDOF(CPropertySheet, pSheet);
if(m_szHostName.IsEmpty())
pSheet->SetWizardButtons(PSWIZB_BACK);
else
pSheet->SetWizardButtons(PSWIZB_BACK|PSWIZB_NEXT);
}