Well first of all getting the window size... I tried it, but I don't really know how to use the Allocate function. It wants to know the size in bytes, but how do I know? The Rect structure seems to store 4 long integers (= 4 * 4 bytes???) so I used 16, but I also tried 4, and basically any other logical value I could think of lol... But the left, top, etc properties all come back as 'undefined':
jscript code:
// Get chat window size
var wndRect = Interop.Allocate(4);
Interop.Call("user32.dll", "GetWindowRect", ChatWnd.Handle, wndRect);
Debug.Trace("Left: " + wndRect.left +
", Top: " + wndRect.top +
", Right: " + wndRect.right +
", Bottom: " + wndRect.bottom);
Output:
code:
Left: undefined, Top: undefined, Right: undefined, Bottom: undefined
Anything else I need to do to make this work?
Also, I forgot I also need the size of desktop (client screen size), excluding task bar if possible. Any API call for that?