Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - progbar() display progress bar http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 progbar()           Display progress bar
------------------------------------------------------------------------------
 Declaration
   screen.hdr

 Syntax
   proc progbar extern
   param value uint     uRow, ;
         value uint     uCol, ;
         value uint     uWidth, ;
         value ulong    nCurrentValue, ;
         value ulong    nMaxValue, ;
         const char(80) cMessage

 Arguments
   uRow is the screen row for bar display.

   uCol is the leftmost screen column for bar display.

   uWidth is the width of the progress bar.

   nCurrentValue is the current value of the measured entity.

   nMaxValue is the maximum value of the measured entity.

   cMessage is a screen message to display above the progress bar.

 Return
   None.

 Description
   The progbar() procedure shows a progress bar whose length depends
   on nCurrentValue as a percentage of nMaxValue. A numeric progress
   value is displayed above the bar when the cMessage parameter is
   supplied. The function performs direct screen write.

 Example
   #define EXAMPLE_SCREEN
   #include example.hdr

   proc Test_progbar
   vardef
      uint n
   enddef
   clear()
   cursor( .f. )
   for n := 1 to 20
      progbar( 10, 5, 40, n, 20, "Indexing..." )
      waitkey( 100 )
   next
   endproc

   proc main
   Test_progbar()
   endproc

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson