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

TreeView
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: TreeView
Javascript code:
function OnWndSettingsEvent_MessageNotification(PlusWnd, Message, wParam, lParam) {
    switch (Message) {
        case WM_NOTIFY:
            var NMHDR = Interop.Allocate(12);
            Interop.Call('kernel32', 'RtlMoveMemory', NMHDR.DataPtr, lParam, 12);
            if (NMHDR.ReadDWORD(0) == PlusWnd.GetControlHandle("TrvSettingGroups")) {
                switch(NMHDR.ReadDWORD(8)) {
                    case TVN_SELCHANGEDW: case TVN_SELCHANGEDA:
                        var NMTREEVIEW = Interop.Allocate(104);
                        Interop.Call('kernel32', 'RtlMoveMemory', NMTREEVIEW.DataPtr, lParam, 104);
                        /*
                            NMTREEVIEW
                                NMHDR : 0-12
                                Action : 12-16
                                TVITEM (itemOld) : 16-56
                                TVITEM (itemNew) : 56-96
                                POINT : 96-104
                        */

                        break;
                }
            }
            NMHDR.Size = 0;
            break;
    }
}


However in theory you could just do this:
Javascript code:
function OnWndSettingsEvent_MessageNotification(PlusWnd, Message, wParam, lParam) {
    switch (Message) {
        case WM_NOTIFY:
            var NMTREEVIEW = Interop.Allocate(104);
            Interop.Call('kernel32', 'RtlMoveMemory', NMTREEVIEW.DataPtr, lParam, 104);
            if (NMTREEVIEW.ReadDWORD(0) == PlusWnd.GetControlHandle("TrvSettingGroups")) {
                switch(NMTREEVIEW.ReadDWORD(8)) {
                    case TVN_SELCHANGEDW: case TVN_SELCHANGEDA:
                        /*
                            NMTREEVIEW
                                NMHDR : 0-12
                                Action : 12-16
                                TVITEM (itemOld) : 16-56
                                TVITEM (itemNew) : 56-96
                                POINT : 96-104
                        */

                        break;
                }
            }
            NMTREEVIEW.Size = 0;
            break;
    }
}


This post was edited on 07-27-2009 at 12:32 PM by matty.
07-26-2009 04:25 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
TreeView - by mathieumg on 07-19-2009 at 11:19 PM
RE: TreeView - by matty on 07-20-2009 at 12:38 PM
RE: TreeView - by mathieumg on 07-20-2009 at 05:21 PM
RE: TreeView - by mathieumg on 07-21-2009 at 02:52 AM
RE: TreeView - by mathieumg on 07-26-2009 at 01:48 PM
RE: TreeView - by matty on 07-26-2009 at 02:36 PM
RE: TreeView - by mathieumg on 07-26-2009 at 03:50 PM
RE: TreeView - by matty on 07-26-2009 at 04:25 PM
RE: TreeView - by mathieumg on 07-26-2009 at 09:27 PM
RE: TreeView - by matty on 07-27-2009 at 12:31 PM


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