Old 25th May 2010, 21:16   #1
siam6606
Junior Member
 
Join Date: May 2010
Posts: 42
Ml_ipc_treeitem_delete

Hi,

How to use the ML_IPC_TREEITEM_DELETE to delete an item to a tree? which handle must be pass? (an example?)...

Thx
Cédric
siam6606 is offline   Reply With Quote
Old 25th May 2010, 21:24   #2
DrO
 
Join Date: Sep 2003
Posts: 27,873
before i make an example for how to use that api, is it your own item that you're trying to remove or one that's been added by another plug-in?

-daz
DrO is offline   Reply With Quote
Old 25th May 2010, 21:43   #3
siam6606
Junior Member
 
Join Date: May 2010
Posts: 42
It's an item i have create and add
siam6606 is offline   Reply With Quote
Old 30th May 2010, 19:39   #4
siam6606
Junior Member
 
Join Date: May 2010
Posts: 42
Ml_ipc_treeitem_getroot

And how to use ML_IPC_TREEITEM_GETROOT???
Thx
siam6606 is offline   Reply With Quote
Old 2nd June 2010, 10:50   #5
DrO
 
Join Date: Sep 2003
Posts: 27,873
PHP Code:
// add item
int m_queue_tree;
NAVITEM queueItem;
queueItem.cbSize sizeof(NAVITEM);
queueItem.mask NIMF_ITEMID;
queueItem.hItem MLNavCtrl_InsertItem(GetMLHwnd(),&nis);
MLNavItem_GetInfo(GetMLHwnd(),&queueItem);
// map to item id or could just cache queueItem.hItem if only dealing with a single item
m_queue_tree queueItem.id;

// remove item
UINT_PTR handle SendMessage(GetMLHwnd(),WM_ML_IPC,(WPARAM)m_queue_tree,ML_IPC_TREEITEM_GETHANDLE);
SendMessage(GetMLHwnd(),WM_ML_IPC,(WPARAM)handle,ML_IPC_TREEITEM_DELETE);

// get root item handle
UINT_PTR root_handle SendMessage(GetMLHwnd(),WM_ML_IPC,0,ML_IPC_TREEITEM_GETROOT); 
this does require including sdk/gen_ml/ml_ipc_0313.h for some of the defines/structures used with those apis. really a complete documentation of all of the ml header files is required (will have to try to find the time over the next month to get that done).

with most of those 5.3+ tree apis, once you've got a valid handle for the item then you can do things, it's just getting the handle to start with which can be an issue if you don't cache the handle or the id of the item added.

-daz
DrO is offline   Reply With Quote
Old 9th June 2010, 14:57   #6
siam6606
Junior Member
 
Join Date: May 2010
Posts: 42
Thx you for all
siam6606 is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast Forums > Developer Center > Winamp Development

Tags
ml_ipc_treeitem_delete

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump