Hehe i will see where i will place them. Normally my chatwindow is always the same size, and DsiplayPicture is always visible

Thnx
EDIT
I have made some code of what you guys said, but i get an error:
quote:
> Script is gestopt.
> Script wordt gestart.
> Script is succesvol gestart.
> Functieaanroep: "OnEvent_Initialize"
> Functieaanroep: "OnEvent_ChatWndDestroyed"
> Functieaanroep: "OnEvent_ChatWndCreated"
> Fout gedetecteerd in lijn 29: Deze eigenschap of methode wordt niet ondersteund door dit object.
(Code: -2146827850)
> Fout gedetecteerd in "OnEvent_ChatWndCreated".
(Code: -2147352567)
> Functieaanroep: "OnEvent_ChatWndSendMessage"
So, the script starts, buy when i create a ChatWnd i get an error on line 29:
code:
Result = Interop.Call("User32", "GetWindowRect", ChatWnds[ChatWnd.Handle] * 1, RECT);
This is my code:
code:
var ChatWnds = new Array();
var PlusWnds = new Array();
function OnEvent_Initialize(MessengerStart) {
if(Messenger.MyStatus > 0) {
for(var e = new Enumerator(Messenger.CurrentChats); !e.atEnd(); e.moveNext()) {
var ChatWnd = e.item();
ChatWnds[ChatWnd.Handle] = ChatWnd;
PlusWnds[ChatWnd.Handle] = MsgPlus.CreateWnd("Buttons.xml", "Buttons", 2);
}
}
}
function Onevent_ChatWndCreated(ChatWnd) {
ChatWnds[ChatWnd.Handle] = ChatWnd;
PlusWnds[ChatWnd.Handle] = MsgPlus.CreateWnd("Buttons.xml", "Buttons", 2);
var Result = Interop.Call("User32.dll", "SetParent", PlusWnds[ChatWnd.Handle], ChatWnds[ChatWnd.Handle]);
Result = Interop.Call("User32.dll", "SetWindowPos", PlusWnds[ChatWnd.Handle], 0, 0, 0, 100, 50, 18);
var RECT = Interop.Allocate(16);
Result = Interop.Call("User32", "GetWindowRect", ChatWnds[ChatWnd.Handle] * 1, RECT);
var CurWidth = RECT.ReadDWORD
- RECT.ReadDWORD(0);
var CurHeight = RECT.ReadDWORD(12) - RECT.ReadDWORD(4);
var x = CurWidth - 120;
var y = CurHeight - 250;
Result = Interop.Call("User32.dll", "SetWindowPos", PlusWnds[ChatWnd.Handle], 0, x, y, 0, 0, 17);
PlusWnds[ChatWnd.Handle].Visible = true;
}
function OnEvent_ChatWndDestroyed(ChatWnd) {
var PlusWnd = PlusWnds[ChatWnd.Handle];
if(PlusWnd != undefined) {
PlusWnd.Close(0);
}
delete ChatWnds[ChatWnd.Handle];
delete PlusWnds[ChatWnd.Handle];
}
What is the problem?
Edit
I added the source as attachment, because this code tags dont works good
