Yeah, I got it now.
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);
var Get = Interop.Call("user32", "GetWindowLongW", PlusWnd.Handle, -20)
if (PlusWnd.Button_IsChecked("ChkTop"))
{
Get = Get & ~0x40000; // remove WS_EX_APPWINDOW
Get = Get | 0x80; // add WS_EX_TOOLWINDOW
}
else
{
Get = Get | 0x40000; // add WS_EX_APPWINDOW
Get = Get & ~0x80; // remove WS_EX_TOOLWINDOW
}
Interop.Call("user32", "SetWindowLongW", PlusWnd.Handle, -20, Get);
Interop.Call("user32", "ShowWindow", PlusWnd.Handle, 1);
},
// ...
It's going to be part of my
DevPlus tool, so it hides the taskbar button when topmost.