Shoutbox

[Bug?] PlusWnd Titlebar - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: [Bug?] PlusWnd Titlebar (/showthread.php?tid=80791)

[Bug?] PlusWnd Titlebar by mynetx on 01-08-2008 at 08:18 AM

Please be aware I did read this posting.


My problem is the following:
I'm using Plus windows with no titlebar, using XML like this:

code:
    <Window Id="WndMain" Version="1">
        <Attributes>
            <ShowInTaskbar>true</ShowInTaskbar>
            <Caption>Chatflash.nl Video Search</Caption>
            <SetForeground>true</SetForeground>
        </Attributes>
        <TitleBar>
            <AllowMinimize>false</AllowMinimize>
            <AllowClose>false</AllowClose>
        </TitleBar>
        <Position Width="310" Height="370"/>
<!-- etc, Elements, Controls, /Window -->

The window shows fine, looks like this:

[Image: 8327p21.png]

Then, at some point later, I'm using JS code to change the title displayed in the system taskbar, using JS like this:
code:
Interop.Call("user32", "SetWindowTextW", wndMain.Handle, strSomeNewTitle);

The taskbar button changes accordingly:
[Image: 6q9g9wl.png]

But the displayed window gets corrupt.

[Image: 7xj9a3k.png]

And all this on
Windows XP Service Pack 2 (5.1.2600)
Windows Live Messenger 8.5.1018
Messenger Plus! Live 4.50.0.312.

Any reason, solution in sight?
Thanks for your help,
RE: [Bug?] PlusWnd Titlebar by Spunky on 01-08-2008 at 05:02 PM

How is this a bug? It's set the window text... You couldn't have been expecting the title to change... It's an image isn't it?


RE: [Bug?] PlusWnd Titlebar by mynetx on 01-08-2008 at 05:05 PM

How then can I change the taskbar button text without showing the Plus! titlebar in the window itself?


RE: [Bug?] PlusWnd Titlebar by Spunky on 01-08-2008 at 05:14 PM

Searched Google and I'm not 100% sure it's possible... Unless theres a message you can send to tell Windows not to paint the title


RE: [Bug?] PlusWnd Titlebar by Matti on 01-08-2008 at 05:15 PM

This is a known issue with Plus! windows. I experienced it too when I was fiddling with my translation system, but it seems like Plus! Live adds the title bar itself.

Well, I'll use this thread then for a suggestion to Patchou:
Make the windows so that when a SetWindowText or WM_SETTEXT is received, check if the original XML defined a title bar so Plus! will only change title bars instead of adding them. It would be much more interesting for us, script developers! ;)


RE: [Bug?] PlusWnd Titlebar by Spunky on 01-08-2008 at 05:20 PM

quote:
Originally posted by Mattike
This is a known issue with Plus! windows. I experienced it too when I was fiddling with my translation system, but it seems like Plus! Live adds the title bar itself.


I'm fairly confident that this is to do with the function itself and not Plus!

the function seems to automatically update the window title, thus making it shown
RE: [Bug?] PlusWnd Titlebar by mynetx on 02-07-2010 at 08:05 AM

Did anybody find out something on how to change the window title, for example via SetWindowTextW, but without causing Plus! to make the window titlebar visible (because there wasn’t one in the XML)?


RE: [Bug?] PlusWnd Titlebar by Matti on 02-07-2010 at 10:33 AM

Yes, Patchou implemented a work-around to set the window title without adding a Plus! title bar. When sending WM_SETTEXT, pass 1 as wParam. This parameter has no meaning for the Windows API, but when sent to a Plus! window, it'll prevent the title bar from being added.

js code:
Interop.Call("user32", "SendMessageW", pPlusWnd.Handle, WM_SETTEXT, 1, "New Window Title");
This has been around since Plus! 4.50.317, so normally you shouldn't have to worry too much about backwards-compatibility.
RE: [Bug?] PlusWnd Titlebar by mynetx on 02-07-2010 at 11:17 AM

Thanks Matti; was this documented somewhere already?