Patchou: Script Windows have an invisible titlebar/border |
Author: |
Message: |
matty
Scripting Guru
Posts: 8336 Reputation: 109
39 / /
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 |
|
|
deAd
Scripting Contest Winner
Posts: 1060 Reputation: 28
– / /
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 |
|
|
matty
Scripting Guru
Posts: 8336 Reputation: 109
39 / /
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 |
|
|
Patchou
Messenger Plus! Creator
Posts: 8607 Reputation: 201
43 / /
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 .
|
|
01-04-2008 03:31 PM |
|
|
matty
Scripting Guru
Posts: 8336 Reputation: 109
39 / /
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.
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>
Attachment: screenshot_00.jpg (59.6 KB)
This file has been downloaded 572 time(s).
This post was edited on 01-04-2008 at 03:56 PM by matty.
|
|
01-04-2008 03:53 PM |
|
|
Patchou
Messenger Plus! Creator
Posts: 8607 Reputation: 201
43 / /
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 .
|
|
01-04-2008 07:40 PM |
|
|
matty
Scripting Guru
Posts: 8336 Reputation: 109
39 / /
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:
Attachment: corner.png (10.46 KB)
This file has been downloaded 484 time(s).
This post was edited on 01-04-2008 at 08:16 PM by matty.
|
|
01-04-2008 07:53 PM |
|
|
Spunky
Former Super Mod
Posts: 3658 Reputation: 61
36 / /
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"
|
|
01-04-2008 08:45 PM |
|
|
matty
Scripting Guru
Posts: 8336 Reputation: 109
39 / /
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 |
|
|
Matti
Elite Member
Script Developer and Helper
Posts: 1646 Reputation: 39
32 / /
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>
|
|
01-05-2008 11:23 AM |
|
|
Pages: (2):
« First
[ 1 ]
2
»
Last »
|
|