IsWindow 函数
The IsWindow function determines whether the specified window handle identifies an existing window.
Parameters
hWnd
[in] Handle to the window to test.
Return Values
If the window handle identifies an existing window, the return value is nonzero.
If the window handle does not identify an existing window, the return value is zero.
使用方法:
void checkHandle(HWND hWnd)
{
if(::IsWindow(hwd))
{
//有效的或存在的窗口句柄
}
else
{
//无效的或不存在的窗口句柄
}
}