What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [help] Windows widths and heights...

[help] Windows widths and heights...
Author: Message:
whiz
Senior Member
****


Posts: 568
Reputation: 8
– / – / Flag
Joined: Nov 2008
O.P. RE: [help] Windows widths and heights...
True.  :P  Ok, but now I have another problem.

Javascript 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?

This post was edited on 01-06-2010 at 07:23 PM by whiz.
01-06-2010 07:21 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[help] Windows widths and heights... - by whiz on 01-06-2010 at 06:15 PM
RE: [help] Windows widths and heights... - by Mnjul on 01-06-2010 at 06:25 PM
RE: [help] Windows widths and heights... - by Spunky on 01-06-2010 at 06:26 PM
RE: [help] Windows widths and heights... - by Mnjul on 01-06-2010 at 06:28 PM
RE: [help] Windows widths and heights... - by whiz on 01-06-2010 at 06:33 PM
RE: [help] Windows widths and heights... - by Matti on 01-06-2010 at 06:51 PM
RE: [help] Windows widths and heights... - by whiz on 01-06-2010 at 07:09 PM
RE: [help] Windows widths and heights... - by Spunky on 01-06-2010 at 07:15 PM
RE: [help] Windows widths and heights... - by whiz on 01-06-2010 at 07:21 PM
RE: [help] Windows widths and heights... - by Spunky on 01-06-2010 at 07:26 PM
RE: [help] Windows widths and heights... - by whiz on 01-06-2010 at 07:31 PM
RE: [help] Windows widths and heights... - by Spunky on 01-06-2010 at 07:37 PM
RE: [help] Windows widths and heights... - by whiz on 01-06-2010 at 07:55 PM
RE: [help] Windows widths and heights... - by Spunky on 01-06-2010 at 08:13 PM
RE: [help] Windows widths and heights... - by whiz on 01-06-2010 at 08:53 PM
RE: [help] Windows widths and heights... - by T-PO on 01-06-2010 at 09:17 PM
RE: [help] Windows widths and heights... - by Eljay on 01-06-2010 at 09:31 PM
RE: [help] Windows widths and heights... - by whiz on 01-06-2010 at 09:49 PM
RE: [help] Windows widths and heights... (solved for now) - by matty on 01-06-2010 at 11:10 PM
RE: [help] Windows widths and heights... (solved for now) - by whiz on 01-07-2010 at 02:04 PM
RE: [help] Windows widths and heights... (solved for now) - by matty on 01-07-2010 at 04:00 PM
RE: [help] Windows widths and heights... (solved for now) - by whiz on 01-07-2010 at 04:51 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On