CursorHand()

CursorHand()

Postby Rafael Clemente » Sat Mar 11, 2006 6:10 pm

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

Re: CursorHand()

Postby Enrico Maria Giordano » Sat Mar 11, 2006 6:39 pm

Try something like this:

Code: Select all  Expand view  RUN
#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
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Rafael Clemente » Sat Mar 11, 2006 6:48 pm

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

Postby Enrico Maria Giordano » Sat Mar 11, 2006 6:50 pm

It works fine here. Have you tried my sample as it is?

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Rafael Clemente » Sun Mar 12, 2006 10:40 am

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], SantaCroya and 73 guests