WOUTPUT( ) Function 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