What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [?] Weirdness. Evolved.

[?] Weirdness. Evolved.
Author: Message:
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
32 / Male / Flag
Joined: Apr 2004
O.P. Huh?  [?] Weirdness. Evolved.
Okay, so I was working on my top secret script project (*evil laugh*), but then I stumbled onto something VERY weird... Here's the situation.

I've got a parent window, the Preferences window. It contains some bottom bar buttons and links to the various preferences child windows. When the user clicks a such link, the associated child window becomes visible while the others are hidden. Using a simple piece of code, the child windows get resized along with the parent when the parent is resizing:
code:
function OnWndPrefEvent_MessageNotification(PlusWnd, Message, wParam, lParam) {
   if(Message == /* WM_SIZE */ 0x5) {
      //MSDN told me that the width and height are in the lParam, so let's make use of it
      var wWidth = lParam & 0xFFFF; //Get low-order word
      var wHeight = (lParam >> 16); //Get high-order word
      //Now, we need to crop the area for the child windows
      cWidth = wWidth - 15;
      cHeight = wHeight - 117;
      //Finally, resize the child windows
      Interop.Call("User32", "SetWindowPos", Wnd["WndPrefGeneral"].Handle, 0, 0, 0, cWidth, cHeight, 18);
      Interop.Call("User32", "SetWindowPos", Wnd["WndPrefLanguage"].Handle, 0, 0, 0, cWidth, cHeight, 18);
   }
   //Let the window do its stuff too (don't know what, but who cares)
   return -1;
}
(The values I subtract from the size are found out by trying out, changing and re-try. No special maths were used for it.)
The above code worked flawless, everything resized perfectly... except one thing I found out today.

While I was working on the Languages child window, I found out that a specific combination of a ListViewControl with LargeIconView and a LinkControl with a BottomFixed Anchor attribute can cause a glitch, making the LinkControl return to the original position, before the window got resized. A quick compiled image should clarify this:
[Image: attachment.php?pid=840560]
As you can see, the LinkControl jumps to it's original position. When I try to resize the window vertically then, the control moves from that position. So, if I resize the parent 10 pixels upwards, the control moves 10 pixels upwards, meaning that it actually took a new position.

If you want to reproduce this, create a window, create a child window with a ListViewControl with LargeIconView and a LinkControl with BottomFixed. Make the parent resizable and use the above code for the child window resizing. Add 2 items to the ListViewControl and follow the instructions.

Now, I'd like to know: can this glitch be fixed with a piece of code or is it caused by Plus! itself? Or is there any other reason which might cause this happening?

Specifications:
Windows Vista Ultimate x64
Windows Live Messenger 8.1.0178 (skinned with Windows Aero Messenger)
Messenger Plus! Live 4.23.0.276

.png File Attachment: script_prob_001.png (69.17 KB)
This file has been downloaded 346 time(s).
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
08-02-2007 07:05 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[?] Weirdness. Evolved. - by Matti on 08-02-2007 at 07:05 PM
RE: [?] Weirdness. Evolved. - by Matti on 08-04-2007 at 11:34 AM
RE: [?] Weirdness. Evolved. - by matty on 08-04-2007 at 01:03 PM
RE: [?] Weirdness. Evolved. - by Matti on 08-04-2007 at 01:13 PM
RE: [?] Weirdness. Evolved. - by ShawnZ on 08-04-2007 at 01:28 PM
RE: [?] Weirdness. Evolved. - by Matti on 08-04-2007 at 01:41 PM
RE: [?] Weirdness. Evolved. - by matty on 08-04-2007 at 02:21 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