First, create a function to handle downloading of a file from the web. My example is like this: <br>UINT InternetGetFile (HINTERNET IN hOpen, CHAR *szUrl, CHAR *szFileName, HWND hwndProgress, int idStatusText, int idProgressBar);<br>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. <br>
评论0
最新资源