Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper Tools . Books 1-3 - <b>setscrstr()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 SETSCRSTR()
 Redirects screen output into a string
------------------------------------------------------------------------------
 Syntax

     SETSCRSTR(<lMode>) --> lRedirected

 Argument

     <lMode>  Designates whether subsequent screen output is put into the
     internal memory area (.T.) or is to reappear on the screen (.F.).  The
     default is mode off (.F.)

 Returns

     SETSCRSTR() returns .T. when the subsequent screen output is routed to
     an internal memory area.  The function returns .F. when anything other
     than window 0 is selected.

 Description

     SETSCRSTR() selects a mode where all screen output is redirected to an
     internal memory area.  After switching on this mode, the memory area is
     initialized as if you had cleared the screen with an @ 0, 0 CLEAR.  All
     screen output that results from the CA-Clipper driver module or the CA-
     Clipper Extended Drivers is rerouted to this memory area.  The data
     stored there is then passed to a variable with GETSCRSTR(), and after
     the mode is switched off, it is passed to the CA-Clipper RESTSCREEN()
     function.  Since the entire screen output is always rerouted and must
     always be selected (with the exception of window 0), call RESTSCREEN()
     with the maximum coordinates for the physical screen of 0, 0, MAXROW(),
     MAXCOL().

 Notes

     Warning!  You cannot implement this function when windows are open.

     .  If the CTUS.LIB Extended Drivers is not linked in, you cannot
        use a CA-Clipper Library function to reroute screen output to a
        variable.

     .  External programs, DOS and BIOS output, can also be redirected
        in a string.  To do this, you must set DSETWINDOW() on (.T.).

     .  Since no output appears on the screen during this hidden
        output mode, switch off "snow prevent" through NOSNOW(.F.).

     .  Use SET CURSOR ON/OFF, if you also want to switch the cursor
        off.

 Examples

     .  Show hidden output.  Should the need arise, switch back to the
        physical screen:

        WSELECT(0)
        ? SETSCRSTR(.T.)                  // .T. when mode on
        @ 10, 10 SAY "XXXXXXX"            // Normal screen output
           *....
        @@ 15, 10 SAY "YYYYYYY

     .  Always call the  GETSCRSTR() function before SETSCRSTR(.F.):

        cVar  := GETSCRSTR()
        ? SETSCRSTR(.F.)                  // .F. when mode off
        RESTSCREEN(0, 0, MAXROW(), MAXCOL(), cVar)


See Also: GETSCRSTR() MAXROW() MAXCOL() DSETWINDOW()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson