CursorHand()

Post Reply
User avatar
Rafael Clemente
Posts: 365
Joined: Sat Oct 08, 2005 7:59 pm
Location: Barcelona, Spain

CursorHand()

Post 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
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: CursorHand()

Post 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
User avatar
Rafael Clemente
Posts: 365
Joined: Sat Oct 08, 2005 7:59 pm
Location: Barcelona, Spain

Post 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
User avatar
Rafael Clemente
Posts: 365
Joined: Sat Oct 08, 2005 7:59 pm
Location: Barcelona, Spain

Post 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
Post Reply