如何在QT中包含URLDownloadToFile? [英] How to include URLDownloadToFile in QT?
本文介绍了如何在QT中包含URLDownloadToFile?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在QT中包括URLDownloadToFile ???
How to include URLDownloadToFile in QT??? How to include the header file for It??
推荐答案
位于 ^ ]:
#include< qt_windows.h>
Found in a Qt example for a browser plugin[^]:
#include <qt_windows.h>
您要使用的功能在urlmon.h
中.
您可以这样尝试:
The function you''re after is inurlmon.h
.
You could try it like this:
#include <tchar.h>
#include <urlmon.h>
#include <Wininet.h>
#pragma comment(lib, "urlmon.lib")
#pragma comment(lib,"wininet.lib")
int main()
{
HRESULT hr;
LPCTSTR Url = _T("http://url.."), File = _T("etc...");
hr = URLDownloadToFile (0, Url, File, 0, 0);
return 0;
}
上面的示例是从以下网站获取的: http://www.dreamincode.net/forums /topic/189846-progress-bar-urldownloadtofile/ [ ^ ]
问候
The example above was grabbed from this web site: http://www.dreamincode.net/forums/topic/189846-progress-bar-urldownloadtofile/[^]
Regards,
这篇关于如何在QT中包含URLDownloadToFile?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文