WOUTPUT( ) Function
Determines whether output is being directed to the active or specified window.
WOUTPUT([WindowName])
Return Values
Logical and Character
Parameters
WindowName
Specifies the window WOUTPUT( ) evaluates for output. Output cannot be directed to a system window or toolbar. If you omit WindowName, WOUTPUT( ) returns the name of the window to which output is currently directed. You can also include the empty string in WindowName to specify the main Visual FoxPro window.WOUTPUT( ) returns the empty string if output is being directed to the main Visual FoxPro window.
Remarks
WOUTPUT( ) returns true (.T.) if the specified user-defined window is the active output window. WOUTPUT( ) returns false (.F.) if the window you specify doesn't exist or is a system window. The last user-defined window activated with ACTIVATE WINDOW is the active output window.
Example
In the following example, a window is created and activated. WOUTPUT( ) is used to display the name of this active output window. The window is closed and removed from memory. If another window is active, its name is displayed. If another window isn't active, a message is displayed indicating that output is directed to the main Visual FoxPro window.
DEFINE WINDOW wOutput1 FROM 2,2 TO 12,32 TITLE 'Output Window'
ACTIVATE WINDOW wOutput1
WAIT WINDOW 'wOutput1 window: ' + WOUTPUT( )
RELEASE WINDOW wOutput1
IF EMPTY(WOUTPUT( ))
WAIT WINDOW 'Output being directed to the main Visual FoxPro window'
ELSE
WAIT WINDOW 'Output window: ' + WOUTPUT( )
ENDIF
See Also
ACTIVATE WINDOW | DEFINE WINDOW | WEXIST( ) | WONTOP( ) | WVISIBLE( )