I would like to propose a slightly different alternative which may be more useful when you have a window with many controls.
Simply make sure that the variable for each control contains a certain keyword (for example "button" )
In this example, I changed added vUrl1 and vUrl2 to the gui add parameters.
Also, replaced the global hCur with a static one
Code:
WM_MOUSEMOVE(wParam,lParam)
{
If( A_Gui <> 1 )
Return
Static hCurs = 0
If( hCurs = 0 )
hCurs:=DllCall("LoadCursor","UInt",NULL,"Int",32649,"UInt") ;IDC_HAND
; Only change controls with Button or Url in their variable.
If( InStr( A_GuiControl, "Button" ) ) or ( InStr( A_GuiControl, "Url" ) )
DllCall("SetCursor","UInt",hCurs)
Return
}