IsWindowVisible will return false, if is has been SW_SHOWn but its parent is hidden
to find out whether the window itself would be visible if its parent was visible would be
(::GetWindowLong(hWnd, GWL_STYLE) & WS_VISIBLE) == WS_VISIBLE;
Didn't you read the OP?
Originally Posted by Monolith
Given a CWnd (or HWND), how do I determine if that window is hidden (as in SW_HIDE) or not?
So, Monolith didn't ask whether the WS_VISIBLE style is currently set or not but whether window is visible or not (hidden)!
Thus as OP already confirmed more than three years ago (!):