for (coPos.Y = Bar->Top + 2; coPos.Y <= Bar->Bottom - 1; coPos.Y++)
{
FillConsoleOutputAttribute(StdOutput,
- FOREGROUND_YELLOW | BACKGROUND_BLUE,
+ Bar->ProgressColour,
Bar->Width - 2,
coPos,
&Written);
PPROGRESSBAR
-CreateProgressBar(
+CreateProgressBarEx(
SHORT Left,
SHORT Top,
SHORT Right,
SHORT TextTop,
SHORT TextRight,
IN BOOLEAN DoubleEdge,
+ SHORT ProgressColour,
CHAR *Text)
{
PPROGRESSBAR Bar;
Bar->TextTop = TextTop;
Bar->TextRight = TextRight;
Bar->Double = DoubleEdge;
+ Bar->ProgressColour = ProgressColour;
Bar->Text = Text;
Bar->Width = Bar->Right - Bar->Left + 1;
return Bar;
}
+PPROGRESSBAR
+CreateProgressBar(
+ SHORT Left,
+ SHORT Top,
+ SHORT Right,
+ SHORT Bottom,
+ SHORT TextTop,
+ SHORT TextRight,
+ IN BOOLEAN DoubleEdge,
+ CHAR *Text)
+{
+
+ /* Call the Ex variant of the function */
+ return CreateProgressBarEx(Left, Top, Right, Bottom,
+ TextTop, TextRight,
+ DoubleEdge,
+ FOREGROUND_YELLOW | BACKGROUND_BLUE,
+ Text);
+}
VOID
DestroyProgressBar(
/* Calculate new percentage */
NewPercent = (ULONG)(((100.0 * (float)Bar->CurrentStep) / (float)Bar->StepCount) + 0.5);
- /* Redraw precentage if changed */
+ /* Redraw percentage if changed */
if (Bar->Percent != NewPercent)
{
Bar->Percent = NewPercent;