954,492 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Help with Progress Bars

Hi everyone, please can anyone show me how to show a progress bar while copying a file. I tried using SetTimer() but i does not work the way i want it i.e the file gets copied after the given time has finished.

huzeifa
Newbie Poster
7 posts since May 2009
Reputation Points: 10
Solved Threads: 0
 

I am not sure about your code but you should put following code in constructor or init method,

m_progress.SetRange(0,100); 
m_progress.SetPos(0);

and StepIt() in a timer procedure,

m_progress.StepIt()
__avd
Posting Genius (adatapost)
Moderator
8,648 posts since Oct 2008
Reputation Points: 2,136
Solved Threads: 1,241
 

What functions are you using to do the copying? win32 api CopyFileEx() will call your function for each portion of the file that has been copied, allowing it to update the progress bar.

Ancient Dragon
Retired & Loving It
Team Colleague
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You