What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Patchou: Script Windows have an invisible titlebar/border

Pages: (2): « First [ 1 ] 2 » Last »
Patchou: Script Windows have an invisible titlebar/border
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
O.P. Patchou: Script Windows have an invisible titlebar/border
Patchou,

How come now the Plus! Script Windows, and Plus! windows in general have an invisible titlebar and border? This has caused problems with Screenshot Sender and the select area function.

What made you decide to add this in?
01-03-2008 02:38 PM
Profile E-Mail PM Find Quote Report
deAd
Scripting Contest Winner
*****

Avatar

Posts: 1060
Reputation: 28
– / Male / Flag
Joined: Jan 2006
RE: Patchou: Script Windows have an invisible titlebar/border
I'm not sure but I think that hiding the borders using a window region instead of painting over them like before makes it easier to show them again when the window is maximized.
01-03-2008 04:03 PM
Profile PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
O.P. RE: Patchou: Script Windows have an invisible titlebar/border
quote:
Originally posted by deAd
I'm not sure but I think that hiding the borders using a window region instead of painting over them like before makes it easier to show them again when the window is maximized.
Fair enough but scripts should have the ability within the XML to not have this happen because now I have to work around this and its a pain in the ass.
01-04-2008 02:23 PM
Profile E-Mail PM Find Quote Report
Patchou
Messenger Plus! Creator
*****

Avatar

Posts: 8607
Reputation: 201
43 / Male / Flag
Joined: Apr 2002
RE: Patchou: Script Windows have an invisible titlebar/border
It is internal to Plus! and it solves a couple of problems.

Let me know how it causes a problem for you and I'll try to make some suggestions :).
[Image: signature2.gif]
01-04-2008 03:31 PM
Profile PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
O.P. RE: Patchou: Script Windows have an invisible titlebar/border
The hidden title bar and borders causes extra space to show up. I cannot move the window up the screen because it is forced down as a default window behavior to make sure there is a portion of the titlebar still showing.

[Image: attachment.php?pid=879901]

Using this code

code:
Interop.Call('user32', 'SetWindowLongW', objWindows['SelectArea'].Handle, (-16) /* GWL_STYLE */, Interop.Call('user32', 'GetWindowLongW', objWindows['SelectArea'].Handle, (-16) /* GWL_STYLE */) & ~ 0xC00000 /* WS_CAPTION */ & ~ 0x400000 /* WS_BOARDER */);

We can remove the title bar and the borders however it doesn't act the same as the overlay window doesn't reach the corners of the screen. So therefore dragging at cursor position 0,0 is dragging on the desktop.

Here is the XML for the window.

code:
<?xml version="1.0" encoding="UTF-16"?>
<Interfaces xmlns="urn:msgplus:interface" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:msgplus:interface PlusInterface.xsd">
    <Window Id="SelectArea" Version="1">
        <Attributes>
            <ShowInTaskbar>False</ShowInTaskbar>
            <TopMost>True</TopMost>
            <NoActivate>True</NoActivate>
            <LockOnClick>False</LockOnClick>
        </Attributes>
        <Titlebar>
            <AllowMinimize>False</AllowMinimize>
            <AllowMaximize>False</AllowMaximize>
            <AllowClose>False</AllowClose>
        </Titlebar>
        <WindowTmpl>
            <Corners Shape="Rectangle">
                <RoundSize>0</RoundSize>
            </Corners>
        </WindowTmpl>
        <Position Width="400" Height="300" />
    </Window>
</Interfaces>

.jpg File Attachment: screenshot_00.jpg (59.6 KB)
This file has been downloaded 545 time(s).

This post was edited on 01-04-2008 at 03:56 PM by matty.
01-04-2008 03:53 PM
Profile E-Mail PM Find Quote Report
Patchou
Messenger Plus! Creator
*****

Avatar

Posts: 8607
Reputation: 201
43 / Male / Flag
Joined: Apr 2002
RE: Patchou: Script Windows have an invisible titlebar/border
I see... well, in order to do this kind of thing, you would probably be much better off creating the window yourself with a direct call to CreateWindowEx().

But if you really want to try continuing to use Plus! windows for this, try adding option 0x100 to your CreateWnd() call :).
[Image: signature2.gif]
01-04-2008 07:40 PM
Profile PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
O.P. RE: Patchou: Script Windows have an invisible titlebar/border
quote:
Originally posted by Patchou
I see... well, in order to do this kind of thing, you would probably be much better off creating the window yourself with a direct call to CreateWindowEx().
How would I subclass this window then if I create it myself? I can't so I am stuck using Plus! windows.
quote:
Originally posted by Patchou
But if you really want to try continuing to use Plus! windows for this, try adding option 0x100 to your CreateWnd() call
Is this undocumented? I create it with 1 so that the window is hidden



Ok so 0x100 worked but I had to make a few changes to the xml file so that the user can't see the window being shown then resized but whatever that part is fixed.

Now another problem. Here is the section from the windows xml
code:
    <WindowTmpl>
        <Corners Shape="Rectangle">
            <RoundSize>0</RoundSize>
        </Corners>
    </WindowTmpl>

With setting that style you would assume the windows corners would be square however as shown in the graphic this is not the case:

[Image: attachment.php?pid=879956]

.png File Attachment: corner.png (10.46 KB)
This file has been downloaded 471 time(s).

This post was edited on 01-04-2008 at 08:16 PM by matty.
01-04-2008 07:53 PM
Profile E-Mail PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
35 / Male / Flag
Joined: Aug 2006
RE: Patchou: Script Windows have an invisible titlebar/border
quote:
Originally posted by matty
With setting that style you would assume the windows corners would be square however as shown in the graphic this is not the case:

Doesn't the number have to be odd? I know 0 is neither odd or even, but it accepts numbers like 1,3,5 etc so 0 might get rounded up...
<Eljay> "Problems encountered: shit blew up" :zippy:
01-04-2008 08:45 PM
Profile PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
O.P. RE: Patchou: Script Windows have an invisible titlebar/border
quote:
Originally posted by SpunkyLoveMuff
quote:
Originally posted by matty
With setting that style you would assume the windows corners would be square however as shown in the graphic this is not the case:

Doesn't the number have to be odd? I know 0 is neither odd or even, but it accepts numbers like 1,3,5 etc so 0 might get rounded up...
0 and 1 have the same affect after I tested I figured I would leave it as 0.
01-04-2008 09:12 PM
Profile E-Mail PM Find Quote Report
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
31 / Male / Flag
Joined: Apr 2004
RE: Patchou: Script Windows have an invisible titlebar/border
Hmm... the scripting documentation says:
quote:
element Window/WindowTmpl/Corners/RoundSize
Only valid if shape is Round. Must be an odd value.
So I think it should simply ignore that. Maybe just remove it?
code:
    <WindowTmpl>
        <Corners Shape="Rectangle"/>
    </WindowTmpl>
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
01-05-2008 11:23 AM
Profile E-Mail PM Web Find Quote Report
Pages: (2): « First [ 1 ] 2 » Last »
« 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