資源簡介
MFC實現FTP客戶端,可以連接FTP服務器進行文件傳輸。。。。
代碼片段和文件信息
//?Ftp.cpp?:?定義應用程序的類行為。
//
#include?“stdafx.h“
#include?“Ftp.h“
#include?“FtpDlg.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#endif
//?CFtpApp
BEGIN_MESSAGE_MAP(CFtpApp?CWinApp)
ON_COMMAND(ID_HELP?&CWinApp::onhelp)
END_MESSAGE_MAP()
//?CFtpApp?構造
CFtpApp::CFtpApp()
{
//?支持重新啟動管理器
m_dwRestartManagerSupportFlags?=?AFX_RESTART_MANAGER_SUPPORT_RESTART;
//?TODO:?在此處添加構造代碼,
//?將所有重要的初始化放置在?InitInstance?中
}
//?唯一的一個?CFtpApp?對象
CFtpApp?theApp;
//?CFtpApp?初始化
BOOL?CFtpApp::InitInstance()
{
//?如果一個運行在?Windows?XP?上的應用程序清單指定要
//?使用?ComCtl32.dll?版本?6?或更高版本來啟用可視化方式,
//則需要?InitCommonControlsEx()。否則,將無法創建窗口。
INITCOMMONCONTROLSEX?InitCtrls;
InitCtrls.dwSize?=?sizeof(InitCtrls);
//?將它設置為包括所有要在應用程序中使用的
//?公共控件類。
InitCtrls.dwICC?=?ICC_WIN95_CLASSES;
InitCommonControlsEx(&InitCtrls);
CWinApp::InitInstance();
if?(!AfxSocketInit())
{
AfxMessageBox(IDP_SOCKETS_INIT_FAILED);
return?FALSE;
}
AfxEnableControlContainer();
//?創建?shell?管理器,以防對話框包含
//?任何?shell?樹視圖控件或?shell?列表視圖控件。
CShellManager?*pShellManager?=?new?CShellManager;
//?標準初始化
//?如果未使用這些功能并希望減小
//?最終可執行文件的大小,則應移除下列
//?不需要的特定初始化例程
//?更改用于存儲設置的注冊表項
//?TODO:?應適當修改該字符串,
//?例如修改為公司或組織名
SetRegistryKey(_T(“應用程序向導生成的本地應用程序“));
CFtpDlg?dlg;
m_pMainWnd?=?&dlg;
INT_PTR?nResponse?=?dlg.DoModal();
if?(nResponse?==?IDOK)
{
//?TODO:?在此放置處理何時用
//??“確定”來關閉對話框的代碼
}
else?if?(nResponse?==?IDCANCEL)
{
//?TODO:?在此放置處理何時用
//??“取消”來關閉對話框的代碼
}
//?刪除上面創建的?shell?管理器。
if?(pShellManager?!=?NULL)
{
delete?pShellManager;
}
//?由于對話框已關閉,所以將返回?FALSE?以便退出應用程序,
//??而不是啟動應用程序的消息泵。
return?FALSE;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????166912??2018-06-07?11:07??Ftp\Debug\Ftp.exe
?????文件????1091040??2018-06-07?11:07??Ftp\Debug\Ftp.ilk
?????文件????5016576??2018-06-07?11:07??Ftp\Debug\Ftp.pdb
?????文件???????2902??2018-06-07?11:07??Ftp\Ftp\Debug\cl.command.1.tlog
?????文件??????49634??2018-06-07?11:07??Ftp\Ftp\Debug\CL.read.1.tlog
?????文件???????2436??2018-06-07?11:07??Ftp\Ftp\Debug\CL.write.1.tlog
?????文件????????667??2018-06-07?11:07??Ftp\Ftp\Debug\Ftp.exe.em
?????文件????????732??2018-06-07?11:07??Ftp\Ftp\Debug\Ftp.exe.em
?????文件????????381??2018-06-07?11:07??Ftp\Ftp\Debug\Ftp.exe.intermediate.manifest
?????文件?????????75??2018-06-07?11:07??Ftp\Ftp\Debug\Ftp.lastbuildstate
?????文件???????2997??2018-06-07?11:07??Ftp\Ftp\Debug\Ftp.log
?????文件??????31516??2018-06-07?11:07??Ftp\Ftp\Debug\Ftp.obj
?????文件???33751040??2018-06-07?11:02??Ftp\Ftp\Debug\Ftp.pch
?????文件??????69888??2018-06-07?11:06??Ftp\Ftp\Debug\Ftp.res
?????文件????????713??2018-06-07?10:01??Ftp\Ftp\Debug\Ftp.vcxprojResolveAssemblyReference.cache
?????文件??????????0??2018-06-07?10:01??Ftp\Ftp\Debug\Ftp.write.1.tlog
?????文件??????85971??2018-06-07?11:07??Ftp\Ftp\Debug\FtpDlg.obj
?????文件????????196??2018-06-07?11:06??Ftp\Ftp\Debug\Ftp_manifest.rc
?????文件??????????2??2018-06-07?11:07??Ftp\Ftp\Debug\li
?????文件??????????2??2018-06-07?11:07??Ftp\Ftp\Debug\li
?????文件???????1656??2018-06-07?11:07??Ftp\Ftp\Debug\li
?????文件???????4968??2018-06-07?11:07??Ftp\Ftp\Debug\li
?????文件???????1128??2018-06-07?11:07??Ftp\Ftp\Debug\li
?????文件????????558??2018-06-07?11:07??Ftp\Ftp\Debug\mt.command.1.tlog
?????文件????????504??2018-06-07?11:07??Ftp\Ftp\Debug\mt.read.1.tlog
?????文件????????408??2018-06-07?11:07??Ftp\Ftp\Debug\mt.write.1.tlog
?????文件????????996??2018-06-07?11:07??Ftp\Ftp\Debug\rc.command.1.tlog
?????文件???????3172??2018-06-07?11:07??Ftp\Ftp\Debug\rc.read.1.tlog
?????文件????????518??2018-06-07?11:07??Ftp\Ftp\Debug\rc.write.1.tlog
?????文件?????635914??2018-06-07?11:02??Ftp\Ftp\Debug\stdafx.obj
............此處省略32個文件信息
評論
共有 條評論