What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Question (newb) about some api

Question (newb) about some api
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Question (newb) about some api
code:
function MakeWndTransparent(hWnd, lTransparencyLevel){
     var nMsg = Interop.Allocate(4);
     var GWL_STYLE = (-20);
     var LWA_ALPHA = 0x2;
     var WS_EX_LAYERED = 0x80000;
     var WS_EX_TRANSPARENT = 0x20;
     nMsg.WriteDWORD(0, Interop.Call('user32', 'GetWindowLongW', hWnd, GWL_STYLE); | WS_EX_LAYERED);
     Interop.Call('user32', 'SetWindowLongW', hWnd, GWL_STYLE, nMsg.ReadDWORD(0));
     Interop.Call('user32', 'SetLayeredWindowAttributes', hWnd, 0, lTransparencyLevel, LWA_ALPHA);
}
I just read your post, you want to hide the window, well your code was to try set the Transparency level. To hide and show a window you can use this:
code:
/* function : _hide | hides the window */
function _hide(hWnd){
     var SW_HIDE = 0;
     Interop.Call('user32', 'ShowWindow', hWnd, SW_HIDE);
}

/* function : _show | shows the window */
function _show(hWnd){
     var SW_SHOW = 5;
     Interop.Call('user32', 'ShowWindow', hWnd, SW_SHOW);
}

This post was edited on 11-15-2006 at 03:46 AM by matty.
11-15-2006 01:57 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Question (newb) about some api - by AITEE on 11-15-2006 at 01:40 AM
RE: Question (newb) about some api - by matty on 11-15-2006 at 01:57 AM
RE: Question (newb) about some api - by AITEE on 11-15-2006 at 03:58 AM
RE: Question (newb) about some api - by CookieRevised on 11-15-2006 at 04:34 AM
RE: Question (newb) about some api - by Plan-1130 on 11-15-2006 at 11:24 PM
RE: Question (newb) about some api - by CookieRevised on 11-16-2006 at 12:53 AM
RE: Question (newb) about some api - by Plan-1130 on 11-16-2006 at 06:32 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