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

[?] Hiding subclass windows...
Author: Message:
whiz
Senior Member
****


Posts: 568
Reputation: 8
– / – / Flag
Joined: Nov 2008
O.P. [?] Hiding subclass windows...
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"?

.png File Attachment: Subclass Windows.png (12.34 KB)
This file has been downloaded 251 time(s).
02-06-2011 10:58 AM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [?] Hiding subclass windows...
What is your code that is creating them?
02-06-2011 02:23 PM
Profile E-Mail PM Find Quote Report
whiz
Senior Member
****


Posts: 568
Reputation: 8
– / – / Flag
Joined: Nov 2008
O.P. RE: [?] Hiding subclass windows...
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.
02-06-2011 02:36 PM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: [?] Hiding subclass windows...
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]

.png File Attachment: Image1.png (13.04 KB)
This file has been downloaded 238 time(s).

This post was edited on 02-06-2011 at 04:57 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
02-06-2011 03:56 PM
Profile PM Find Quote Report
whiz
Senior Member
****


Posts: 568
Reputation: 8
– / – / Flag
Joined: Nov 2008
O.P. RE: [?] Hiding subclass windows...
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!  :)
02-07-2011 02:57 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »


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