📄 setftpdlg.cpp
字号:
// SETFTPDLG.cpp : implementation file
//
#include "stdafx.h"
#include "AccountInput.h"
#include "SETFTPDLG.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CSETFTPDLG dialog
CSETFTPDLG::CSETFTPDLG(CWnd* pParent /*=NULL*/)
: CDialog(CSETFTPDLG::IDD, pParent)
{
//{{AFX_DATA_INIT(CSETFTPDLG)
m_Password = _T("");
m_ServerName = _T("");
m_FTP_UserName = _T("");
m_PORT = _T("");
//}}AFX_DATA_INIT
}
void CSETFTPDLG::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CSETFTPDLG)
DDX_Text(pDX, IDC_FTP_PASS, m_Password);
DDX_Text(pDX, IDC_FTP_SERVER, m_ServerName);
DDX_Text(pDX, IDC_FTP_USERNAME, m_FTP_UserName);
DDX_Text(pDX, IDC_PORT, m_PORT);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CSETFTPDLG, CDialog)
//{{AFX_MSG_MAP(CSETFTPDLG)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CSETFTPDLG message handlers
BOOL CSETFTPDLG::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
TCHAR szFileName[MAX_PATH];
GetModuleFileName( NULL , szFileName , MAX_PATH );
CString szConfig = szFileName;
int nPos = szConfig.ReverseFind( '\\' );
szConfig = szConfig.Left( nPos );
szConfig += _T("\\MDT.ini") ;
DWORD nlength;
nlength=50;
LPTSTR strServerName,strUser,strPass,strPort;
strServerName=new TCHAR[50];
strUser=new TCHAR[50];
strPass=new TCHAR[50];
strPort=new TCHAR[50];
GetPrivateProfileString(_T("FTP"),_T("FTPSERVER"),_T("0"),strServerName,nlength,szConfig);
GetPrivateProfileString(_T("FTP"),_T("UserName"),_T("0"),strUser,nlength,szConfig);
GetPrivateProfileString(_T("FTP"),_T("PASSWORD"),_T("0"),strPass,nlength,szConfig);
GetPrivateProfileString(_T("FTP"),_T("PORT"),_T("0"),strPort,nlength,szConfig);
m_ServerName =strServerName;
m_FTP_UserName = strUser;
m_Password = strPass;
m_PORT=strPort;
UpdateData(FALSE);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -