Code: Select all
#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oPrn
PRINT oPrn PREVIEW
PAGE
oPrn:Say( 100, 100, "This is a test" )
oPrn:Box( 0, 0, 1000, 1000 )
ENDPAGE
ENDPRINT
RETURN NIL
Code: Select all
METHOD Box( nRow, nCol, nBottom, nRight, oPen ) CLASS TPrinter
local hOldBrush := SelectObject( ::hDCOut, GetStockObject( BRUSH_NULL ) )
Rectangle( ::hDCOut, nRow, nCol, nBottom, nRight, iif( oPen != NIL, oPen:hPen, 0 ) )
SelectObject( ::hDCOut, hOldBrush )
return nil