Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 07-21-2005, 02:46 AM   #1 (permalink)
Salchester
Salchester
 
Salchester's Avatar
 
Join Date: Jul 2005
Location: In a house
Posts: 230
Salchester is an unknown quantity at this point
Loading Bar

Hello Everyone,

I am trying to create an animated progress bar in C++. Can anybody please shed some light on how this could be done.

Many Thanks,
__________________
Many Thanks, in advance!

Salchester.
The Future Is Here - Are You Ready?
Salchester is offline   Reply With Quote
Old 07-21-2005, 06:10 AM   #2 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,693
redhead is on a distinguished road
Hmm.. didn't my latest display of such a solution give you any idear ??
The theory in it, is to dislay the percentage as beeing:
(<amount done>*100)/<total amount>
The question on how to be certain how much the total amount is, thats a good one, if it's reading from a file you could probably find a clever way of guessing it from some combination of tellg() and seekg(). Something which theoreticaly might sound like:
Code:
1) open file
2) start = tellg()
3) seekg(0, ois::end)
4) end = tellg()
5) seekg(0, ios::beg)
6) while(!eof)
        read input from file
        cur = tellg();
        percent = ((cur - start)*100/(end - start)); 
        display_percentage(percent);
         do stuff with input
7) close file.
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help Salchester Standard C, C++ 12 07-21-2005 01:57 AM
Bottom Bar underneath sidebar awieds HTML, XML, Javascript, AJAX 24 04-07-2005 10:18 PM
javascript prgress bar JED23 HTML, XML, Javascript, AJAX 7 04-05-2005 03:37 AM
Just Installed Smart Bar XP Beta ashish Lounge 0 08-30-2004 08:33 PM
Loading Binary Data infinite_root PHP 2 08-23-2004 10:14 PM


All times are GMT -8. The time now is 01:27 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting