Shoutbox

[?] Hiding subclass windows... - 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: [?] Hiding subclass windows... (/showthread.php?tid=96640)

[?] Hiding subclass windows... by whiz on 02-06-2011 at 10:58 AM

After starting to use a minimize-to-tray app, I was getting a number of invisible windows with the Plus! logo.  After a bit of investigation, I found that they were subclass windows I used in my scripts.

[Image: attachment.php?pid=1008242]

I've also noticed (since a while ago, but I've only recently worked out why it happens) that when Messenger freezes, all the subclass windows appear as small blocks (just showing a portion of the title bar since the windows are 0px by 0px) in the middle of the screen.

Just wondering: is there a way of making them "more hidden"?


RE: [?] Hiding subclass windows... by matty on 02-06-2011 at 02:23 PM

What is your code that is creating them?


RE: [?] Hiding subclass windows... by whiz on 02-06-2011 at 02:36 PM

XML code:
<Window Id="WndSubclass" Version="1">
 
    <Attributes>
        <ShowInTaskbar>false</ShowInTaskbar>
    </Attributes>
 
    <Position Width="0" Height="0"/>
 
    <DialogTmpl/>
 
</Window>

That's the one out of Interface Writer, but I think the subclass windows in my other script are the same.

Something else, though: in some scripts, I'm using the subclass window to show dialogs and stuff (so that they have a matching custom icon, etc.), but that's not too important if I can't do that any more.
RE: [?] Hiding subclass windows... by CookieRevised on 02-06-2011 at 03:56 PM

This is what I use for my 'hidden' subclassing windows, dunno if that might help. Notice the Titlebar properties and the lack of the DialogTemplate* specification in the XML)

XML code:
    <Window Id="WndSubclass" Version="1">
        <Attributes>
            <ShowInTaskbar>False</ShowInTaskbar>
        </Attributes>
        <Position Width="0" Height="0"/>
        <TitleBar>
            <AllowMinimize>False</AllowMinimize>
            <AllowMaximize>False</AllowMaximize>
            <AllowClose>False</AllowClose>
        </TitleBar>
    </Window>

code:
WndSubclass = MsgPlus.CreateWnd('wndsubclass.xml', 'WndSubclass', 1);

Can't it be that the 'problem' is in that minimize-to-tray app itself, showing all windows instead of just windows which have a visible portion (size > 0x0), a title on the titlebar and/or buttons, and are actually visible, etc?

* Why do you need that anyways if the window is just for catching messages?. It has been a very long time since I played with interface windows so I can be wrong, but if you specifiy that isn't there stuff being drawn on the window? Is the shown XML the entire specification you use for those windows, or did you leave some stuff out in your post?

--------------


EDIT: I have just tested TrayIt! myself (with the sendTo script running), and it does not show the hidden subclass helper windows here on XP (as defined and used like the XML and JS code above), nor any other hidden window which exist (there are many of such windows on every system).

So, my guess is that you're doing something wrong with your JS-code or XML-code, or that you forgot to define some things (like those titlebar properties) or that you defined some things which actually make that subclass window visible (like the custom icons or dialog template definition).... You need to test these things yourself though, I don't have the time atm to do all this ;)

PS: in some posts/articles about TrayIt!, it is said that it doesn't work as it should on Windows7 (but that's more about the changed tray system in Win7). Dunno what OS you're using, but maybe this can be the culprint too?

[Image: attachment.php?pid=1008263]
RE: [?] Hiding subclass windows... by whiz on 02-07-2011 at 02:57 PM

XML code:
<Window Id="WndSubclass" Version="1">
 
    <Attributes>
        <ShowInTaskbar>False</ShowInTaskbar>
    </Attributes>
 
    <Position Width="0" Height="0"/>
 
    <TitleBar>
        <AllowMinimize>False</AllowMinimize>
        <AllowMaximize>False</AllowMaximize>
        <AllowClose>False</AllowClose>
    </TitleBar>
 
</Window>

That works perfectly.  It seems that omitting the title bar element seems to cause it to be shown.  Also, just setting Maximize to false (assuming Minimize and Close use their defaults of false) causes the title bar to be shown...  :S

Anyway, thanks Cookie!  :)