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:
TheGuruSupremacy
Full Member
***

Avatar

Posts: 367
Reputation: 19
34 / Male / Flag
Joined: Nov 2006
O.P. RE: RE: GetWindowPlacement api
quote:
Originally posted by Mattike
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');
    }
}


Don't work so...However the problem is not this...I can't retrive when it's minimized not when it's opened..to retrive if it's opened i can use findwindow api function

This post was edited on 12-20-2006 at 04:50 PM by TheGuruSupremacy.
12-20-2006 04:49 PM
Profile PM 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