matty
Scripting Guru
Posts: 8336 Reputation: 109
39 / /
Joined: Dec 2002
Status: Away
|
RE: [request] Auto-maximize?
code: var WindowPlacement = Interop.Allocate(48);
var RECT = Interop.Allocate(16);
var SW_MAXIMIZE = 0x3;
function _setPlacement(hWnd){
if (hWnd > 0){
Interop.Call('user32', 'GetWindowRect', hWnd, RECT);
with (WindowPlacement){
.WriteDWORD(8, SW_MAXIMIZE)
.WriteDWORD(36, RECT.ReadDWORD(0));
.WriteDWORD(40, RECT.ReadDWORD(4));
.WriteDWORD(44, RECT.ReadDWORD(8));
.WriteDWORD(48, RECT.ReadDWORD(12));
}
Interop.Call('user32', 'SetWindowPlacement', hWnd, WindowPlacement);
}
}
function OnEvent_ChatWndCreated(objChatWnd){
_setPlacement(objChatWnd);
}
function OnEvent_ContactListWndCreated(objWnd){
_setPlacement(objWnd);
}
This post was edited on 12-04-2006 at 05:05 AM by matty.
|
|