www.pudn.com > CraftFTP_gb.rar > ConnectWizardPage2.cpp
// ConnectWizardPage2.cpp : implementation file
//
#include "stdafx.h"
#include "CraftFTP.h"
#include "ConnectWizardPage2.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CConnectWizardPage2 property page
const DWORD CConnectWizardPage2::m_nHelpIDs[] =
{
IDC_EDIT_SITELABEL, HIDC_EDIT_SITELABEL,
0 , 0
};
IMPLEMENT_DYNCREATE(CConnectWizardPage2, CPropertyPageExt)
CConnectWizardPage2::CConnectWizardPage2() : CPropertyPageExt(CConnectWizardPage2::IDD)
{
//{{AFX_DATA_INIT(CConnectWizardPage2)
m_szSiteLabel = _T("");
//}}AFX_DATA_INIT
}
CConnectWizardPage2::~CConnectWizardPage2()
{
}
void CConnectWizardPage2::DoDataExchange(CDataExchange* pDX)
{
CPropertyPageExt::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CConnectWizardPage2)
DDX_Text(pDX, IDC_EDIT_SITELABEL, m_szSiteLabel);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CConnectWizardPage2, CPropertyPageExt)
//{{AFX_MSG_MAP(CConnectWizardPage2)
ON_EN_CHANGE(IDC_EDIT_SITELABEL, OnChangeEditSitelabel)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CConnectWizardPage2 message handlers
BOOL CConnectWizardPage2::OnSetActive()
{
// TODO: Add your specialized code here and/or call the base class
//¸üÐÂ״̬
OnChangeEditSitelabel();
return CPropertyPageExt::OnSetActive();
}
void CConnectWizardPage2::OnChangeEditSitelabel()
{
// 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_szSiteLabel.IsEmpty())
pSheet->SetWizardButtons(PSWIZB_BACK);
else
pSheet->SetWizardButtons(PSWIZB_BACK|PSWIZB_NEXT);
}