Hans Dietrich wrote:
You can use the IsWindow() function to determine if the window has been closed (i.e., destroyed).
Although this works in the most of the case, it is not "safe": when a window is destroyed its handle becomes invalid and the is ID (the handle value) can be reused by the system for another subsequently created window. If you don't look at all that while happening, IsWindow may return TRUE, but the window may not be the one you intended. (I mean: "my name (handle) is the same of my grandfather, I was born after his death, and I live in what it was his house. But I'm not him"! But if you send a letter to him, I'll read it as mine and, hopefully, I can understand the misleading only from the context".)
2 bugs found. > recompile ... 65534 bugs found. :doh: