...
drawRulerLines( oApp:aRulerBmp1[nArea], nRulerTop, nRuler, nColPos )
// AEVAL( aRuler, {|x,y| IIF( x[1] <> NIL, ;
// ( x[1]:Move( nRulerTop-nRuler, nColPos, 1, ;
// IIF( lShow, ER_GetPixel( oGenVar:aAreaSizes[y,2] ) + nRuler, nRuler ), .T. ) ), ) } )
...
FUNCTION drawRulerLines( oRulerBmp, nRulerTop, nRuler, nColPos )
LOCAL hDC := oRulerBmp:GetDC()
if !empty( aOldRect )
InvertRect(hDC , aOldRect )
endif
aNewRect := { nRulerTop - (nRuler+10 ), nColPos-2, nRulerTop , nColPos }
InvertRect( hDC , aNewRect )
aOldRect := aNewRect
oRulerBmp:ReleaseDC()
RETURN nil
function DeclarePublics( cDefFile )
.../...
PUBLIC oRulerBmp1 := {}
PUBLIC oRulerBmp2 := {}
PUBLIC nRuler := 20
PUBLIC nRulerTop := 37
.../...
function FillWindow( nArea, cAreaIni )
.../...
if Len( oRulerBmp1 ) < nArea
AAdd( oRulerBmp1, nil )
endif
if Len( oRulerBmp2 ) < nArea
AAdd( oRulerBmp2, nil )
endif
@ nRulerTop-nRuler, 20 BITMAP oRulerBmp1[ nArea ] RESOURCE cRuler1 OF aWnd[nArea] PIXEL NOBORDER
@ nRulerTop-nRuler, 0 BITMAP oRulerBmp2[ nArea ] RESOURCE cRuler2 OF aWnd[nArea] PIXEL NOBORDER
.../...
Antonio Linares wrote:Manuel,
.../...
El problema que tenemos ahora es que al pasar por encima de un control (item) no se pinta.
A ver que se nos ocurre...
function DrawRulerLines( oWnd, nColPos, nRowPos )
local aPoint := { nRowPos, nColPos }
local aPointI := aPoint
local y
local z := 0
local lSw := .F.
local hDC //:= oWnd:GetDC()
For y = 1 to len( aItems )
if !empty( aItems[ y, 1 ] )
//ScreenToClient( aItems[ y, 1 ]:hWnd, aPointI )
//ClientToScreen( aItems[ y, 1 ]:hWnd, aPointI )
if IsOverWnd( aItems[ y, 1 ]:hWnd, aPointI[ 1 ], aPointI[ 2 ] )
//ScreenToClient( aItems[ y, 1 ]:hWnd, aPoint )
oMsgInfo:SetText( " SI " )
z := y
lSw := .T.
y := len( aItems ) + 1
endif
endif
Next y
hDC := oWnd:GetDC()
if !lSw
//hDC := oWnd:GetDC()
if ! Empty( oWnd:Cargo )
InvertRect( hDC, oWnd:Cargo )
endif
oWnd:Cargo = { 17, aPoint[ 2 ], 37, aPoint[ 2 ] + 1 }
InvertRect( hDC, oWnd:Cargo )
else
if ! Empty( aItems[ z, 1 ]:Cargo )
InvertRect( hDC, aItems[ z, 1 ]:Cargo )
endif
ClientToScreen( aItems[ z, 1 ]:hWnd, aPoint )
aItems[ z, 1 ]:Cargo = { 17, aPoint[ 2 ], 37, aPoint[ 2 ] + 1 }
InvertRect( hDC, aItems[ z, 1 ]:Cargo )
endif
oWnd:ReleaseDC()
return nil
Return to EasyReport, EasyDialog y EasyPreview
Users browsing this forum: No registered users and 4 guests