Page 1 of 1

implement CmLine TPrinter

Posted: Wed Apr 25, 2012 7:14 pm
by ronaldo
I would like to implement the method cmline in TPrinter but want to do it in another prg

I did so, but gives error


winfunc.prg

CLASS TPrinter FROM TPrinter

METHOD CmLine( nTop, nLeft, nBottom, nRight, oPen ) INLINE
::Cmtr2Pix(@nTop, @nLeft), ::Cmtr2Pix(@nBottom, @nRight),;
MoveTo( ::hDCOut, nLeft, nTop ),;
LineTo( ::hDCOut, nRight, nBottom,;
If( oPen != nil, oPen:hPen, 0 ) )

ENDCLASS

Re: implement CmLine TPrinter

Posted: Thu Apr 26, 2012 1:22 am
by Kleyber