UpdateProgressBar updates progress in a progress bar window shown by ShowProgressBar method by percent parameter.