js code:
TopToggle = function(PlusWnd)
{
Interop.Call("user32", "SetWindowPos", PlusWnd.Handle, PlusWnd.Button_IsChecked("ChkTop") ? -1 : -2, 0, 0, 0, 0, 3);
Interop.Call("user32", "ShowWindow", PlusWnd.Handle, 0); // hide window
>>> var Get = Interop.Call("user32", "GetWindowLong", PlusWnd.Handle, -20); // -20 for extended window styles<<<
Get += (PlusWnd.Button_IsChecked("ChkTop") ? 262016 : -262016); // toggle APPWINDOW / TOOLWINDOW
Interop.Call("user32", "SetWindowLong", PlusWnd.Handle, -20, Get); // set new flag
Interop.Call("user32", "ShowWindow", PlusWnd.Handle, 1); // show window
}
Error: unknown (code: -2147467259) at highlighted line. MSDN says the
GetWindowLong function returns a LONG type result - is this the problem?