FUNCTIONS CORE

InvertWin()

Exchange the foreground and background color on the screen

Syntax

Signature
InvertWin( [nTop], [nLeft], [nBottom], [nRight] ) --> cNull

Arguments

nTop

nLeft

nBottom

nRight

Example

InvertWin.prg
#if OS_LINUX
   REQUEST GTXWC
#else
   REQUEST GTWVT
#endif

PROCEDURE Main()

   ClearWin( 2, 40, 8, 70, "W/B", " " )
   DispOutAt( 5, 50, "xDev", "W/B" )

   InvertWin( 2, 40, 8, 70 )

   Check( 'ScreenAttr( 5, 50 ) ', ScreenAttr( 5, 50 ), ColorToN( "B/W" ) )

   Inkey( 0 )

RETURN

STATIC PROCEDURE Check( cTitle, xResult, xExpected )

   QOut( cTitle + IIF( xResult == xExpected, "OK", "ERROR" ) )

RETURN

Output