gpt4 book ai didi

c++ - 什么 API 会启动 FTP 传输并向 GUI 报告状态?

转载 作者:行者123 更新时间:2023-11-28 03:45:49 25 4
gpt4 key购买 nike

想像 MFC 应用程序,只需一个按钮 - “下载”

  • 用户选择下载,然后提示输入文件的保存位置。
  • 连接到远程 ftp 服务器(登录名、ip、文件以获取所有硬编码)
  • 显示已下载文件量的状态栏。

哪个 Windows API 最能支持整个 C 或 C++ 应用程序? (希望尽可能简单明了)

最佳答案

  • User selects download and then is prompted for the location of where the file will be saved.

你有 Common File Dialog为了那个原因。 MFC 有一个包装器。

  • Connects to the remote ftp server (login, ip, file to GET all hard coded)

有 WinInet API,其中包括 FtpGetFile 等功能

  • Displays a status bar of how much of the file has been downloaded.

如果您需要报告进度,请使用 FtpOpenFile而是使用 InternetReadFile 读取 block 。 Windows 进度条由 CreateWindow 创建,并由 SendMessage 控制。

关于c++ - 什么 API 会启动 FTP 传输并向 GUI 报告状态?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7758353/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com