If you want to catch the MouseEvents on a tree or listview here is a small workaround for Win32(BTW: This should be in Max for every Gadget)
First you have to find the "win32listbox.cpp" in "mod\brl.mod\win32maxgui.mod\win32gui" and open it.
The First Function in this code related to the listbox is
Win32ListBox::Win32ListBox( BBGroup *group,int style ):BBListBox(group,style){
... a few things
...
_gadget.setWndProc(this);
}
Now to add the MouseEvents to the Listbox you simply have to
add one line, so it looks as follows:
Win32ListBox::Win32ListBox( BBGroup *group,int style ):BBListBox(group,style){
... a few things
...
_gadget.setWndProc(this);
_gadget.setEventMask( BBEVENT_MOUSEMASK,this );
}
And now you also catch the MouseEvents in a ListBox (completely with the x and y coordinates)
Only tested with listboxes, but should work also with every other Gadget.
BTW:
By changing :
setEventMask( BBEVENT_MOUSEMASK,this );
to
setEventMask( BBEVENT_MOUSEMASK|BBEVENT_KEYMASK,this );
You can also catch the keys pressed in the listbox
I hope this solves your problems