Winform和net的结合

时间:2011-02-08 08:50:00
【文件属性】:

文件名称:Winform和net的结合

文件大小:7KB

文件格式:ZIP

更新时间:2011-02-08 08:50:00

inet.zip

First, create a function to handle downloading of a file from the web. My example is like this:
UINT InternetGetFile (HINTERNET IN hOpen, CHAR *szUrl, CHAR *szFileName, HWND hwndProgress, int idStatusText, int idProgressBar);
It's UINT because it will return a value if an error occurs. Otherwise, it will return 0. In order to use this function, all you have to do is provide a valid HINTERNET handle obtained using a standard InternetOpen() call. If you want, you can provide a handle to a progress window (and an ID for the STATIC control for status, and the PROGRESS control for the progress bar), where the function will display its status. Everything else is self-explanatory. I begin the body of the function declaring some variables.


【文件预览】:
Inet.doc
inet.h

网友评论