Advertisement
tabnation

GUI mouse over control

Sep 13th, 2022
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. IDC_APPSTARTING := 32650
  2. IDC_ARROW := 32512
  3. IDC_CROSS := 32515
  4. IDC_HAND := 32649
  5. IDC_HELP := 32651
  6. IDC_IBEAM := 32513
  7. IDC_NO := 32648
  8. IDC_SIZEALL := 32646
  9. IDC_SIZENESW := 32643
  10. IDC_SIZENS := 32645
  11. IDC_SIZENWSE := 32642
  12. IDC_SIZEWE := 32644
  13. IDC_UPARROW := 32516
  14. IDC_WAIT := 32514
  15. BCursor:=DllCall("LoadCursor", "UInt", NULL,"Int", IDC_HAND, "UInt")
  16. LVCursor:=DllCall("LoadCursor", "UInt", NULL,"Int", IDC_HELP, "UInt")
  17. OnMessage(0x200,"WM_MOUSEMOVE")
  18.  
  19. #include %A_mydocuments%\AHKPlaygroundData\ext.ahk ;this is here since gui needs to load first
  20.  
  21. Gui, Show, x%x% y%y% h%h% w%w%, AHK Playground %vmode%
  22. Return
  23.  
  24. WM_MOUSEMOVE(wParam, lParam) {
  25. global BCursor
  26. global LVCursor
  27. MouseGetPos,,,, ctrl
  28. if (ctrl == "Button1")
  29. DllCall("SetCursor","UInt",BCursor) ; To set the cursor
  30. if (ctrl == "Button2")
  31. DllCall("SetCursor","UInt",BCursor) ; To set the cursor
  32. if (ctrl == "Button3")
  33. DllCall("SetCursor","UInt",BCursor) ; To set the cursor
  34. if (ctrl == "Button4")
  35. DllCall("SetCursor","UInt",BCursor) ; To set the cursor
  36. if (ctrl == "Button5")
  37. DllCall("SetCursor","UInt",BCursor) ; To set the cursor
  38. if (ctrl == "ListBox1")
  39. DllCall("SetCursor","UInt",LVCursor) ; To set the cursor
  40. }
  41. Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement