This was an aggravating bugger, but I finally figured it out after an hour of messing around. It turns out that calling QueryObject on the tabber only returns the client hwnd (the work area below the tabs), and not the handle to the tabber itself. Calling GetParent on the original hWnd fixes the problem.
;SetWindowLong%(hWnd%,Val%,Long%):"SetWindowLongA" ;GetWindowLong%(hWnd%,Val%):"GetWindowLongA" ;GetParent%(hwnd%) Function Test(Gadget) Local hWnd% = QueryObject(Gadget, 1) hWnd = GetParent(hWnd) Local GWL_STYLE = -16 Local TCS_HOTTRACK = $40 SetWindowLong hWnd, GWL_STYLE, GetWindowLong(hWnd, GWL_STYLE) - TCS_HOTTRACK End Function