Use GetForegroundWindow() rather than GetDesktopWindow() for progress dialogs on Windows