drawline method

drawline method

Postby Silvio.Falconi » Sat Jul 02, 2016 9:18 am

drawline method on richedit not run good
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
 
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 92 guests