This will be more precise than treating "returning out of the modal loop" as a substitute for knowing when the `HWND` is destroyed.