how to get a dialog box being repainted if there is a blocking process running?