I thinked to make this
ACTION oRtf:DrawLine()
- Code: Select all Expand view
Method Drawline( nTop, nLeft, nBottom, nRight, nColor, nWPen, nStyle ) CLASS TRichEdit
local hPen, hOldPen
local hdc := ::GetDc()
DEFAULT nWPen := 1
DEFAULT nColor := 0
DEFAULT nStyle := PS_SOLID
DEFAULT nTop := ::aOldPos[ 2 ]
DEFAULT nLeft := ::aOldPos[ 1 ]
DEFAULT nBottom := ::aPos[ 2 ]
DEFAULT nRight := ::aPos[ 1 ]
hPen := CreatePen( nStyle, nWPen, nColor )
hOldPen := SelectObject( hDC, hPen )
MoveTo( hDC, nLeft, nTop )
LineTo( hDC, nRight, nBottom )
SelectObject( hDC, hOldPen )
DeleteObject( hPen )
::ReleaseDc()
return 0