HI,
SOmeone can help me with this,
How add method OnMouseOver and OnMouseOut to this class;
Thanks.
#include "FiveWin.ch"
#define TME_LEAVE 2
#define WM_MOUSELEAVE 675
function Main()
local oWnd, oBmp
DEFINE WINDOW oWnd
oBmp = TMyBitmap():New( 50, 50,,,, "test.bmp", .T., oWnd,,,,,,,,, .T. )
oBmp:bMMoved = { || oWnd:SetText( "Over me" ), TrackMouseEvent( oBmp:hWnd, TME_LEAVE ) }
oBmp:bMLeave = { || oWnd:SetText( "Out of me" ) }
ACTIVATE WINDOW oWnd
return nil
CLASS TMyBitmap FROM TBitmap
DATA bMLeave
METHOD HandleEvent( nMsg, nWParam, nLParam )
METHOD MouseLeave( nRow, nCol, nFlags )
ENDCLASS
METHOD HandleEvent( nMsg, nWParam, nLParam ) CLASS TMyBitmap
if nMsg == WM_MOUSELEAVE
return ::MouseLeave( nHiWord( nLParam ), nLoWord( nLParam ), nWParam )
endif
return Super:HandleEvent( nMsg, nWParam, nLParam )
METHOD MouseLeave( nRow, nCol, nFlags ) CLASS TMyBitmap
if ! Empty( ::bMLeave )
Eval( ::bMLeave, nRow, nCol, nFlags, Self )
endif
return nil
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 26 guests