Page 1 of 1

get OnGetMouseMove

Posted: Wed Oct 02, 2024 10:57 am
by Silvio.Falconi
how can i check when the mouse is inside a get control ?
i would like to call my own function

Re: get OnGetMouseMove

Posted: Wed Oct 02, 2024 3:42 pm
by MaxP
Hi Silvio,

here is a sample.

Code: Select all | Expand

#include "Fivewin.ch"

FUNCTION MAIN()
        LOCAL   oDlg, oGet, cVar := SPACE( 20 ), lPass := .F.

        DEFINE DIALOG oDlg FROM 0, 0 TO 400, 500 TITLE "TEST OVER" PIXEL
        
        oDlg:bMMoved := { | nRow, nCol, nKeyFlags | MyOverDlg( @lPass ) }

        @  14, 10 GET oGet VAR cVar OF oDlg SIZE 50, 12 PIXEL
        
        oGet:bMMoved := { | nRow, nCol, nKeyFlags | MyOverGet( @lPass ) }

        ACTIVATE DIALOG oDlg CENTER
RETURN NIL

STATIC FUNCTION MyOverDlg( lPass )
        IF lPass
                lPass := .F.
        ENDIF
RETURN NIL

STATIC FUNCTION MyOverGet( lPass )
        IF .NOT. lPass
                lPass := .T.
                
                MsgStop( "OVER" )
        ENDIF
RETURN NIL
 
Regards
Massimo