Skip to content

Instantly share code, notes, and snippets.

@grey-code
Created April 3, 2013 20:16
Show Gist options
  • Save grey-code/5304819 to your computer and use it in GitHub Desktop.
Save grey-code/5304819 to your computer and use it in GitHub Desktop.
AutoHotkey: WM_SETCURSOR()
; Prevent "sizing arrow" cursor when hovering over window border
WM_SETCURSOR(wParam, lParam) { ; WM_SETCURSOR := 0x0020
; standard arrow cursor
static HARROW := DllCall("LoadCursor", "Ptr", 0, "Ptr", 32512, "UPtr")
HTCODE := lParam & 0xFFFF
if (HTCODE > 9) && (HTCODE < 19) { ; cursor is on a border
DllCall("SetCursor", "Ptr", HARROW) ; show arrow cursor
return true ; prevent further processing
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment