Danilo,
after studying your code (thanks!!) I made a stripped-down version
that only shows a hand cursor on a regular button:
Code: Select all
; Hand Cursor Button Test
hWindow = OpenWindow(0,200,200,200,200,#PB_Window_SystemMenu,"Hand Cursor Test")
CreateGadgetList(WindowID())
hButton = ButtonGadget(0,10,10,80,25,"Hand Test")
SetClassLong_(hButton,#GCL_HCURSOR,0)
handcursor = LoadCursor_(0, 32649) ; #IDC_HAND
Procedure HandMouse()
Shared handcursor,hWindow,hButton
If ChildWindowFromPoint_(hWindow,WindowMouseX(),WindowMouseY()-20) = hButton
normalcursor = SetCursor_(handcursor)
Else
If normalcursor : SetCursor_(normalcursor) : normalcursor = 0 : EndIf
EndIf
EndProcedure
Repeat
Event = WaitWindowEvent()
If Event = #PB_EventCloseWindow : done = 1
ElseIf Event = #WM_MOUSEMOVE : HandMouse()
EndIf
Until done
End
Horst
