什么 API 将启动 FTP 传输并向 GUI 报告状态?
想象一下类似 MFC 应用程序的东西,只需一个按钮 -“下载”
- 用户选择下载,然后系统会提示您输入文件的保存位置。
- 连接到远程 ftp 服务器(登录名、IP、文件以获取所有硬编码)
- 显示已下载文件量的状态栏。
哪个 Windows API 最能支持整个 C 或 C++ 应用程序? (希望尽可能简单明了)
Thinking of something like an MFC application, with one button - "Download"
- User selects download and then is prompted for the location of where the file will be saved.
- Connects to the remote ftp server (login, ip, file to GET all hard coded)
- Displays a status bar of how much of the file has been downloaded.
Which Windows API would best support this entire application in C or C++? (looking to keep it as simple and straightforward as possible)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您已获得 通用文件对话框。 MFC 有一个包装器。
有 WinInet API,其中包括诸如
FtpGetFile
如果需要报告进度,请使用
FtpOpenFile
改为使用InternetReadFile
读取块。 Windows 进度条由CreateWindow
创建并由SendMessage
控制。You've got the Common File Dialog for that. MFC has a wrapper.
There's the WinInet API, which includes function such as
FtpGetFile
If you need to report progress, use
FtpOpenFile
instead and read chunks usingInternetReadFile
. Windows progress bars are created withCreateWindow
and controlled withSendMessage
.