What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » GetWindowPlacement api

GetWindowPlacement api
Author: Message:
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
32 / Male / Flag
Joined: Apr 2004
RE: GetWindowPlacement api
According to the MSDN site and the Win32 API Constants, this should do it:
code:
var WindowPlacment = Interop.Allocate(48);
function _getPlacement(hWnd){
    if (hWnd > 0){
        Interop.Call('user32', 'GetWindowPlacement', hWnd, WindowPlacement);
       
        Debug.Trace('> .showCmd : '+WindowPlacement.ReadDWORD(8));
        if (WindowPlacement.ReadDWORD(8) == 3){
            Debug.Trace(' > .showCmd : Maximized');
        } else if (WindowPlacement.ReadDWORD(8) == 2){
            Debug.Trace(' > .showCmd : Minimized');
        } else if (WindowPlacement.ReadDWORD(8) == 1){
            Debug.Trace(' > .showCmd : Opened');
        } else if(WindowPlacement.ReadDWORD(8) == 6){
            Debug.Trace(' > .showCmd : Opened');
        }

    } else {
        Debug.Trace(' > .showCmd : Closed');
    }
}

This post was edited on 12-20-2006 at 04:42 PM by Matti.
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
12-20-2006 04:40 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
GetWindowPlacement api - by TheGuruSupremacy on 12-20-2006 at 04:32 PM
RE: GetWindowPlacement api - by Matti on 12-20-2006 at 04:40 PM
RE: RE: GetWindowPlacement api - by TheGuruSupremacy on 12-20-2006 at 04:49 PM
RE: RE: GetWindowPlacement api - by CookieRevised on 12-20-2006 at 07:36 PM
RE: RE: RE: GetWindowPlacement api - by TheGuruSupremacy on 12-20-2006 at 09:21 PM
RE: GetWindowPlacement api - by Spunky on 12-20-2006 at 04:44 PM
RE: RE: GetWindowPlacement api - by TheGuruSupremacy on 12-20-2006 at 04:53 PM
RE: GetWindowPlacement api - by Spunky on 12-20-2006 at 04:50 PM
RE: GetWindowPlacement api - by Spunky on 12-20-2006 at 05:03 PM
RE: RE: GetWindowPlacement api - by TheGuruSupremacy on 12-20-2006 at 05:17 PM
RE: GetWindowPlacement api - by Spunky on 12-20-2006 at 05:29 PM
RE: RE: GetWindowPlacement api - by TheGuruSupremacy on 12-20-2006 at 05:36 PM
RE: GetWindowPlacement api - by Spunky on 12-20-2006 at 05:43 PM
RE: RE: GetWindowPlacement api - by TheGuruSupremacy on 12-20-2006 at 05:47 PM
RE: GetWindowPlacement api - by CookieRevised on 12-20-2006 at 09:49 PM
RE: RE: GetWindowPlacement api - by TheGuruSupremacy on 12-21-2006 at 10:27 AM


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