Thread: Progress Bar

  1. #1
    Registered User
    Join Date
    Sep 2004

    Question Progress Bar


    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


  2. #2
    Registered User
    Join Date
    Feb 2002
    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..

  3. #3
    Registered User ventolin's Avatar
    Join Date
    Jan 2004
    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

  4. #4
    Attack hamster fuh's Avatar
    Join Date
    Dec 2002
    I looked it up on MSDN and found this:
    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

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Updating a progress bar
    By NewGuy100 in forum C++ Programming
    Replies: 2
    Last Post: 03-13-2006, 01:00 PM
  2. beach bar (sims type game)
    By DrKillPatient in forum Game Programming
    Replies: 1
    Last Post: 03-06-2006, 01:32 PM
  3. Is comctl32.lib required for progress bar controls?
    By JasonD in forum Windows Programming
    Replies: 4
    Last Post: 08-28-2004, 02:30 PM
  4. progress bar newbie
    By WaterNut in forum Windows Programming
    Replies: 18
    Last Post: 08-09-2004, 01:42 PM
  5. File Through Winsock & Progress on bar
    By (TNT) in forum Windows Programming
    Replies: 4
    Last Post: 12-05-2001, 10:50 PM