I'm having trouble determining if a window has been closed (by the user pressing the "x" button) based on the window's handle. I *can* just try showing the window and checking for a failure, but there's obviously a better way than that.
you may be able to use windows' synchronization functions. off the top of my head, I don't remember if they work with a window handle but if you are looking to see if a process has terminated they should work, and may work for a window handle as well.
A Window is not a synchronization object, you cannot "wait" for it.
guestgulkan is correct. You are notified with WM_CLOSE and have the opportunity to allow or disallow the close. That's where some applications display a message box asking for confirmation.