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

Transparent background for RichEditControl
Author: Message:
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
31 / Male / Flag
Joined: Apr 2004
RE: RE: Transparent background for RichEditControl
Well, GetWindowLong and SetWindowLong are Win32 API functions and are not built-in in JScript. Therefore, you'll need to call the libraries with Interop.Call. Also, the control handle can only be retrieved with PlusWnd.GetControlHandle. With these two things in mind, we end up with the following code:
code:
//PlusWnd is your created window with the RichEditControl
var GWL_EXSTYLE = -16
var WS_EX_TRANSPARENT = 0x20

var hWnd = PlusWnd.GetControlHandle("EdtThingy"); //Parameter is the Id of the RichEditcontrol
var Style = Interop.Call("user32", "GetWindowLong", hWnd, GWL_STYLE);
if(Style > 0) {
   Interop.Call("user32", "SetWindowLong", hWnd, GWL_STYLE, Style | WS_EX_TRANSPARENT);
} else {
   Debug.Trace("GetWindowLong returned an error. Return value: "+(Style.toString()));
}
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
05-28-2007 07:18 AM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Transparent background for RichEditControl - by pariah123 on 05-24-2007 at 02:55 PM
RE: Transparent background for RichEditControl - by Ash_ on 05-28-2007 at 02:32 AM
RE: RE: Transparent background for RichEditControl - by Matti on 05-28-2007 at 07:18 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