My code of drag'n'drop does not working anymore.
I located the problem on this piece of code:
- Code: Select all Expand view RUN
- METHOD LButtonUp( nRow, nCol, nKeyFlags ) CLASS TControl
local aPoint := { nRow, nCol }
local lMoved := .f.
::lMouseDown = .f.
if lDragging
lDragging = .f.
ReleaseCapture()
aPoint = ClientToScreen( ::hWnd, aPoint )
if aPoint[ 1 ] > 32768
aPoint[ 1 ] -= 65535
endif
if aPoint[ 2 ] > 32768
aPoint[ 2 ] -= 65535
endif
SendMessage( WindowFromPoint( aPoint[ 2 ], aPoint[ 1 ] ),;
FM_DROPOVER, nKeyFlags, nMakeLong( nRow, nCol ) )
return nil
endif
In the version 15.7 this piece of code was:
- Code: Select all Expand view RUN
- if lDragging
lDragging = .f.
ReleaseCapture()
aPoint = ClientToScreen( ::hWnd, aPoint )
if aPoint[ 1 ] > 32768
aPoint[ 1 ] -= 65535
endif
if aPoint[ 2 ] > 32768
aPoint[ 2 ] -= 65535
endif
SendMessage( WindowFromPoint( aPoint[ 2 ], aPoint[ 1 ] ),;
FM_DROPOVER, nKeyFlags, nMakeLong( aPoint[ 1 ], aPoint[ 2 ] ) )
return nil
endif
The point passed from screen space to client space, of a unknowed window!
Does anyone remember the motivation of this change?
Personally I think is correct pass the coordinates in screen space...
I think could be usefull pass the origin window too...