Mercurial > dwindows
diff win/dw.c @ 317:83edbd751da9
Added dw_tree_get_data() to get a tree item's data.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Thu, 03 Apr 2003 00:29:46 +0000 |
parents | ff8f23594b15 |
children | f452ef00e193 |
line wrap: on
line diff
--- a/win/dw.c Wed Apr 02 11:31:38 2003 +0000 +++ b/win/dw.c Thu Apr 03 00:29:46 2003 +0000 @@ -5839,6 +5839,28 @@ } /* + * Gets the item data of a tree item. + * Parameters: + * handle: Handle to the tree containing the item. + * item: Handle of the item to be modified. + */ +void * API dw_tree_set_data(HWND handle, HWND item) +{ + TVITEM tvi; + void **ptrs; + + tvi.mask = TVIF_HANDLE; + tvi.hItem = (HTREEITEM)item; + + if(TreeView_GetItem(handle, &tvi)) + { + ptrs = (void **)tvi.lParam; + return ptrs[1]; + } + return NULL; +} + +/* * Sets this item as the active selection. * Parameters: * handle: Handle to the tree window (widget) to be selected.