The IsWindow function determines whether the given window handle is valid.
hwnd
Identifies a window.
The return value is nonzero if the window handle is valid. Otherwise, it is zero.
IsWindowEnabled, IsWindowVisible