js 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:
js 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;
}
}