Hello eveyone! :)

I am making a rather huge application, and I'm starting to face a global problem.

Whenever my application is doing sommething, i have a functional progress bar setup to show the progress. My problem is now, that, atleast on Windows Vista / Windows 7, my application whitens and is claimed not to be responding!

With a quick CURL download-script I can in Windows see the file grow, so yes, the application IS doing something.

I use the CURL buildin progress function to update my bar.

curl_easy_setopt(curl, CURLOPT_URL, "ftp://localhost/myFile.exe");
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, my_fwrite);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &ftpfile);
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0L);
curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, prog_cb);
static int prog_cb (void *p, double dltotal, double dlnow, double ult, double uln){
SendMessage(GetDlgItem(updateBox,IDC_PROGRESS1), PBM_SETPOS, dlnow/dltotal*100, NULL);
return 0;

How do i make my Win 32 application stay active while CURL get my file?

As mentioned, my progress bar IS working, until the window turn inactive as "not responding".

Hope it is possible to understand my question (:
- Regards, Excizted.

Recommended Answers

All 4 Replies

Use multiple threads?

Aha. Yeah it seems obvious now. Give the download tast it's own thread. Just hope my progressbar will still work.
Thanks (:

Just hope my progressbar will still work

As long as you have a valid handle to the progress bar, it will work, good luck :icon_cool:

Thank you very much! (:

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.