Hi,
I am writting a FTP application (VC++ MFC). I want to show a progress bar to indicated the 'progress' of the file transfer.
How can I get the progress bar to accuratley show how much of the file has been transfered.
Many Thanks
Magic
Hi,
I am writting a FTP application (VC++ MFC). I want to show a progress bar to indicated the 'progress' of the file transfer.
How can I get the progress bar to accuratley show how much of the file has been transfered.
Many Thanks
Magic
When you browse the FTPserver, i guess you retrieve info about the file, like it's size..?
The prograss bar's max value is then 100%, and you update the progress bar as you download...
This will only work if you're at the winsock level..If you use the FTP commands from Wininet.dll, i don't think you can display progress..
If you have such attributes as the file's length (eg 23456 bytes) and the current byte being transferred (eg 678), calculate the % via
(transferred / length) * 100 = percent;
Use a send message to the Dialog Control to update the % shown
Not sure at the moment on the Message to send .. you may need to look it up in MSDN
I looked it up on MSDN and found this: http://msdn.microsoft.com/library/de...ar/reflist.asp
Hope that's what you're looking for.
Stupid things pop singers say
"I get to go to lots of overseas places, like Canada."
- Britney Spears
"I love what you've done with the place!"
-Jessica Simpson upon meeting the Secretary of Interior during tour of the White House