True.
Ok, but now I have another problem.
js code:
var SWP_NOMOVE = 2;
var SWP_NOZORDER = 4;
var WndTest = MsgPlus.CreateWnd("Interfaces\\Test.xml", "WndTest", 0);
WndTest.RegisterMessageNotification(0x5, true);
WndTest.SetControlText("EdtWidth", 400);
WndTest.SetControlText("EdtHeight", 300);
function OnWndTestEvent_MessageNotification(PlusWnd, Message, wParam, lParam)
{
if (Message === 0x5)
{
WndTest.SetControlText("EdtWidth", (lParam & 0xFFFF));
WndTest.SetControlText("EdtHeight", (lParam >> 16));
}
}
function OnWndTestEvent_CtrlClicked(PlusWnd, ControlId)
{
if (ControlId == "BtnSize")
{
Interop.Call("user32.dll", "SetWindowPos", WndTest.Handle, null, 0, 0, WndTest.GetControlText("EdtWidth"), WndTest.GetControlText("EdtHeight"), SWP_NOMOVE | SWP_NOZORDER);
}
}
That's what I have so far. But by clicking the size button after typing in, say, 300x200, I end up with an infinitely sized window. Am I missing something?
Edit: never mind, found it. Forgot
parseInt().
Although, it doesn't actually size it right. 400x300 comes out as 394x268. How come?