What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Resource] Subclassing ActiveXObjects (and [Release] TabbedStatusIcon too!)

[Resource] Subclassing ActiveXObjects (and [Release] TabbedStatusIcon too!)
Author: Message:
felipEx
Scripting Contest Winner
***


Posts: 378
Reputation: 24
35 / Male / Flag
Joined: Jun 2006
RE: [Resource] Subclassing ActiveXObjects (and [Release] TabbedStatusIcon too!)
Hi :]

phalanxii:  i'm not totally sure if it's correct, but it works fine here

code:
var GWL_WNDPROC = -4
var lpPrevWndProc = 0

function OnEvent_Initialize() {
    if(Messenger.MyStatus > 0) OnEvent_SigninReady();
}

function OnEvent_SigninReady() {
    for (var e = new Enumerator(Messenger.CurrentChats); !e.atEnd(); e.moveNext()) OnEvent_ChatWndCreated(e.item());
}

function OnEvent_Uninitialize(MessengerExit){
    for (var e = new Enumerator(Messenger.CurrentChats); !e.atEnd(); e.moveNext()){
        if (lpPrevWndProc != 0)    Interop.Call('user32', 'SetWindowLongW', e.item().Handle, GWL_WNDPROC, lpPrevWndProc)
    }
}

function OnEvent_ChatWndCreated(ChatWnd){
    lpPrevWndProc = Interop.Call('user32', 'SetWindowLongW', ChatWnd.Handle, GWL_WNDPROC,  Interop.GetCallbackPtr('WindowProc') )
}

function OnEvent_ChatWndDestroyed(ChatWnd){
    if (lpPrevWndProc != 0)    Interop.Call('user32', 'SetWindowLongW', ChatWnd.Handle, GWL_WNDPROC, lpPrevWndProc)
}

function WindowProc(hwnd, uMsg, wParam, lParam){
    if (uMsg == 0x6 && wParam != 0){
        // stuff
    }
    return Interop.Call('user32', 'CallWindowProcW', lpPrevWndProc, hwnd, uMsg, wParam, lParam)
}
* felipEx waits for Cookie's reply :D
03-28-2008 05:00 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[Resource] Subclassing ActiveXObjects (and [Release] TabbedStatusIcon too!) - by phalanxii on 03-27-2008 at 12:05 PM
RE: [Resource] Subclassing ActiveXObjects (and [Release] TabbedStatusIcon too!) - by effection on 03-27-2008 at 04:45 PM
RE: RE: [Resource] Subclassing ActiveXObjects (and [Release] TabbedStatusIcon too!) - by phalanxii on 03-28-2008 at 12:47 AM
RE: [Resource] Subclassing ActiveXObjects (and [Release] TabbedStatusIcon too!) - by CookieRevised on 03-27-2008 at 07:25 PM
RE: [Resource] Subclassing ActiveXObjects (and [Release] TabbedStatusIcon too!) - by felipEx on 03-28-2008 at 05:00 AM
RE: [Resource] Subclassing ActiveXObjects (and [Release] TabbedStatusIcon too!) - by phalanxii on 03-28-2008 at 07:03 AM
RE: [Resource] Subclassing ActiveXObjects (and [Release] TabbedStatusIcon too!) - by CookieRevised on 03-28-2008 at 04:57 PM
RE: RE: [Resource] Subclassing ActiveXObjects (and [Release] TabbedStatusIcon too!) - by deAd on 03-28-2008 at 06:22 PM
RE: [Resource] Subclassing ActiveXObjects (and [Release] TabbedStatusIcon too!) - by CookieRevised on 03-28-2008 at 06:49 PM
RE: RE: [Resource] Subclassing ActiveXObjects (and [Release] TabbedStatusIcon too!) - by deAd on 03-28-2008 at 07:20 PM
RE: [Resource] Subclassing ActiveXObjects (and [Release] TabbedStatusIcon too!) - by Patchou on 03-28-2008 at 07:34 PM
RE: [Resource] Subclassing ActiveXObjects (and [Release] TabbedStatusIcon too!) - by CookieRevised on 03-29-2008 at 03:56 AM
RE: RE: [Resource] Subclassing ActiveXObjects (and [Release] TabbedStatusIcon too!) - by deAd on 03-29-2008 at 06:17 PM
RE: [Resource] Subclassing ActiveXObjects (and [Release] TabbedStatusIcon too!) - by CookieRevised on 03-29-2008 at 07:18 PM
RE: [Resource] Subclassing ActiveXObjects (and [Release] TabbedStatusIcon too!) - by riahc4 on 03-31-2008 at 12:59 AM
RE: [Resource] Subclassing ActiveXObjects (and [Release] TabbedStatusIcon too!) - by phalanxii on 04-12-2008 at 12:44 AM
RE: [Resource] Subclassing ActiveXObjects (and [Release] TabbedStatusIcon too!) - by roflmao456 on 04-12-2008 at 02:13 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