title: How to download a file in wxWidgets with a progress dialog?
body: <p>I have some code here that spawns a wxProgressDialog and downloads a file from the internet, but I can't figure out how to make the progress bar update as the file downloads. I've looked for documentation on this, but surprisingly I haven't been able to find something similar to what I'm trying to accomplish.</p>
  
  <pre><code>void Downloader::Download(void)
  {
      wxProgressDialog dlgProgress(_T("Downloading..."),
                                   _T("Please wait while your file downloads."));
  
      wxURL dl(Url);
      if (dl.GetError() == wxURL_NOERR)
      {
          wxInputStream *in = dl.GetInputStream();
          if (in &amp;&amp; in-&gt;IsOk())
          {
              wxFFileOutputStream out(mPath);
              in-&gt;Read(out);
          }
          delete in;
      }
  }
  </code></pre>