Progress bar on inputted text file 
Author Message
 Progress bar on inputted text file

Quote:

> I want a progress bar as I parse a text file.

> Is there a clever way of finding out how many lines are in the file?

> I'm running on a nt/dos machine.

> Thanks,
> CG

Read the file in in one lump and count the \n characters. Not clever,
but effective.

Cecil

--
Cecil Galbraith

Free programmer's utilities and MFC tips at
http://www.*-*-*.com/ ~cgalbrai



Wed, 29 Sep 1999 03:00:00 GMT  
 Progress bar on inputted text file

Instead of basing your progress through the file on the line count, try
basing it on the number of bytes processed. That's what I do.
CFile.GetLength() returns the total size of the file and can be called once
and used when calculating your progress.



Quote:
> I want a progress bar as I parse a text file.

> Is there a clever way of finding out how many lines are in the file?

> I'm running on a nt/dos machine.

> Thanks,
> CG



Sat, 02 Oct 1999 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Showing file loading/saving progress in progress bar?

2. Display text in progress bar

3. Progress Bar Text: Fact or Fiction?

4. Progress bar not showing visual progress

5. progress bar for copying files

6. progress bar on a status bar

7. progress bar on a status bar

8. Progress bar is not showing on status bar

9. Progress Bar in Status Bar Pane

10. Progress bar in status bar

11. progress bar in the status bar.

12. Progress Bar In A Status Bar

 

 
Powered by phpBB® Forum Software