I haven't tried this on windows myself, but you should be able to have two processes/threads where one does the GUI stuff and another does the work stuff and the worker process updates the GUI process with progress information, which can be shown in a progress bar. Take a look
372392 for an example