Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ MT-multithreading and servers » downloading file progress bar
downloading file progress bar [message #16873] Fri, 18 July 2008 17:44 Go to next message
TeCNoYoTTa is currently offline  TeCNoYoTTa
Messages: 138
Registered: July 2008
Location: Egypt
Experienced Member

hello all

i am very happy that members here help me solving proplems that face me

now my program may do some process that take some time like downloading a file

Now i want to make the progress bar tell the user the progress

i know i need to do Multithreading but how can i do it ??

i didnt understand to example that comes with theIDE ... please help me

and thanks in advance
Re: downloading file progress bar [message #16880 is a reply to message #16873] Sat, 19 July 2008 09:41 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13974
Registered: November 2005
Ultimate Member
String ExecuteRedirect(int max_redirect = DEFAULT_MAX_REDIRECT,
int retries = DEFAULT_RETRIES, Gate2<int, int> progress = false);


The last parameter, 'progress', defines a callback that is called to show to progress and allow the cancelation.


Progress class has 'operator Gate2<int, int>()', means you can directly connect it here, e.g. this should work:

Progress pi("Loading");
x.ExecuteRedirect(DEFAULT_MAX_REDIRECT, DEFAULT_RETRIES, pi);


Mirek
Re: downloading file progress bar [message #16884 is a reply to message #16880] Sat, 19 July 2008 12:12 Go to previous messageGo to next message
TeCNoYoTTa is currently offline  TeCNoYoTTa
Messages: 138
Registered: July 2008
Location: Egypt
Experienced Member

thanks but this error happened

c:\myapps\cisnotifier\CISNotifier.h(113) : error C2065: 'DEFAULT_MAX_REDIRECT' : undeclared identifier
c:\myapps\cisnotifier\CISNotifier.h(113) : error C2065: 'DEFAULT_RETRIES' : undeclared identifier
Re: downloading file progress bar [message #16885 is a reply to message #16884] Sat, 19 July 2008 12:25 Go to previous message
bytefield is currently offline  bytefield
Messages: 210
Registered: December 2007
Experienced Member
Hi, it should be:
x.ExecuteRedirect(HttpClient::DEFAULT_MAX_REDIRECT, HttpClient::DEFAULT_RETRIES, pi);


cdabbd745f1234c2751ee1f932d1dd75
Previous Topic: downloading file help
Next Topic: making thread
Goto Forum:
  


Current Time: Tue Mar 19 10:35:47 CET 2024

Total time taken to generate the page: 0.00928 seconds