FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour CursorHand()
Posts: 365
Joined: Sat Oct 08, 2005 07:59 PM
CursorHand()
Posted: Sat Mar 11, 2006 06: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

Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: CursorHand()
Posted: Sat Mar 11, 2006 06:39 PM
Try something like this:

#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
Posts: 365
Joined: Sat Oct 08, 2005 07:59 PM
CursorHand()
Posted: Sat Mar 11, 2006 06: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

Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
CursorHand()
Posted: Sat Mar 11, 2006 06:50 PM

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

EMG

Posts: 365
Joined: Sat Oct 08, 2005 07:59 PM
CursorHand()
Posted: 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

Continue the discussion