GUI_WINSTATU$(WIN)

Will return a string containing the status of the passed window - either CLOSED, OPEN, or HIDDEN.