RE: win32lib listview issues

new topic     » topic index » view thread      » older message » newer message

Rangi wrote:
> 
> 
> A problem and a question
> 
> 1) I accidentally right clicked on a listview column header and got a 
> crash with this message 
> "...\include\Win32lib.ew:22411 in function getPointerRelPos() attempt to 
> 
> exit a function without returning a value"
> Tried the same on the win32lib demo progs always and get same result.
> I'm running win2k and win32lib 59.1


A known bug that has been fixed. The function called fDoNM_RCLICK needs 
to be as below...

    sequence xy
    atom keys
    integer lRealId

    lRealId = fetch( lParam, NMHDR_idFrom )                     
    if lRealId != 0 then
        lRealId = getId( fetch( lParam, NMHDR_hwndFrom ) )
    else
        lRealId = id
    end if        
    xy = getPointerRelPos(lRealId)
    keys = getKeyMasks(0)
    VOID = invokeHandler( lRealId, w32HMouse, {WM_RBUTTONUP, 
xy[1],xy[2], keys} )
    return {kReturnNow}
end function


and the routine 'getPointerRelPos' should be ...

global function getPointerRelPos(integer pId)

    if validId(pId) then
        return getPointerPos() - ClientToScreen(pId, 0, 0)
    else                
        return {0,0}        
    end if

end function

--------------------- 
Patch posted by Derek 
---------------------


Regards,

Julio C. Galaret Viera

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu