Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - savescrn() save a screen area to a variable http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 savescrn()          Save a screen area to a variable
------------------------------------------------------------------------------
 Declaration
   screen.hdr

 Syntax
   func _HSCR savescrn extern
   param value uint uTop, ;
         value uint uLeft, ;
         value uint uBottom, ;
         value uint uRight

 Arguments
   uTop is the top row of the screen area.

   uLeft is the leftmost column of the screen area.

   uBottom is the bottom row of the screen area.

   uRight is the rightmost column of the screen area.

 Return
   A saved screen handle.

 Description
   This function returns a handle to a saved screen area. The screen handle
   must be stored in a variable of type _HSCR. To restore the original screen,
   use the restorescrn() procedure. Screens do not have to be restored in the
   order in which they were saved.

 Example
   #define EXAMPLE_SCREEN
   #include example.hdr

   proc MessageDisp
   param const char cMessage
   // Save a screen area that is proportional to the message length
   vardef
      uint  nLeft
      _HSCR hScreen
   enddef
   nLeft := 40 - len( cMessage ) / 2
   hScreen := savescrn( 10, nLeft - 2, 14, nLeft + len( cMessage ) + 2 )
   @ 10, nLeft - 2 to 13, nLeft + len( cMessage ) + 2
   @ 11, nLeft ?? cMessage
   @ 12, nLeft ?? substr( "Press any key to continue...", 1, len( cMessage ) )
   getkey()
   restorescrn( hScreen )
   endproc
   
   proc Test_savescrn
   MessageDisp( "Delete request for hard drive C: has been confirmed" )
   endproc

   proc main
   Test_savescrn()
   endproc

See Also: restorescrn()

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