Richard, replace this functions with the following code and test it!
It seems, the error was only when you clicks very near the border.
- Code: Select all Expand view
static function IsOver( hWnd, nRow, nCol )
local aWndRect := GetWndRect( hWnd )
local aCursorPos := GetCursorPos()
DEFAULT nRow := aCursorPos[ 1 ], nCol := aCursorPos[ 2 ]
return nRow > aWndRect[ 1 ]-2 .and. nRow < aWndRect[ 3 ]+2 .and. ;
nCol > aWndRect[ 2 ]-2 .and. nCol < aWndRect[ 4 ]+2 .and. hWnd == hWndDown
- Code: Select all Expand view
function FWSkinBtnLButtonUp( hWnd, nRow, nCol )
local hDC := GetDC( hWnd )
local oBtn := oWndFromhWnd( hWnd )
if IsOver( hWnd ) .and. lBtnPressed //changed
PostMessage( GetParent( hWnd ), WM_COMMAND, GetWindowLong( hWnd, GWL_ID ), hWnd )
else
ReleaseCapture()
endif
...
...