Given a handle of type HWND
is it possible to confirm that the handle represents a real window?
There is a function IsWindow
which does exactly what you asked for.
BOOL isRealHandle = IsWindow(unknwodnHandle);
Look at this link for more information.
Generally no. By the time you've got confirmation that a Window is valid another process/thread my come along and remove it for you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With