Code for progress bar in Windows