Page 1 of 1

CursorHand()

Posted: Sat Mar 11, 2006 6:10 pm
by Rafael Clemente
I have an small Dialog WS_POPUP+WS_BORDER, completely filled with a Bmp. I'd like to change the cursor to CursorHand whenever it is positiones over tha dialog (o bmp). I have tried several approaches such as:
ON INIT (::LoadImg(), CursorHand()) but no luck. Any suggestion? Thanks
Rafael

Re: CursorHand()

Posted: Sat Mar 11, 2006 6:39 pm
by Enrico Maria Giordano
Try something like this:

Code: Select all

#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg, oCur

    DEFINE DIALOG oDlg

    oDlg:bMMoved = { || CursorHand() }
    oDlg:bLButtonUp = { || CursorHand() }
    oDlg:bRButtonUp = { || CursorHand() }

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL
EMG

Posted: Sat Mar 11, 2006 6:48 pm
by Rafael Clemente
Thanks, Enrico, but no. It does not work. In fact, it does not do anything either when moving over the dialog or pushing buttons. I'll keep trying other approaches.
Rafael

Posted: Sat Mar 11, 2006 6:50 pm
by Enrico Maria Giordano
It works fine here. Have you tried my sample as it is?

EMG

Posted: Sun Mar 12, 2006 10:40 am
by Rafael Clemente
Enrico:
Your sample works Ok. The reason that mine didn't was that the Bmp covered the whole of my dialog from border to border. I just had to put: ::oImg:bMMoved := {||CursorHand()} etc... and the problem got fixed. It is working fine now. Thanks again,
Rafael