I've never like this technique of converting to a bool data type - it smells wrong!
Instead, we're using a handy template called boolean_cast found here. It's a flexible solution that's more explicit in what it's doing and can used as follows:
bool IsWindow = boolean_cast< bool >(::IsWindow(hWnd));