comparison 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
comparison
equal deleted inserted replaced
316:a07e08f708d6 317:83edbd751da9
5837 ptrs[1] = itemdata; 5837 ptrs[1] = itemdata;
5838 } 5838 }
5839 } 5839 }
5840 5840
5841 /* 5841 /*
5842 * Gets the item data of a tree item.
5843 * Parameters:
5844 * handle: Handle to the tree containing the item.
5845 * item: Handle of the item to be modified.
5846 */
5847 void * API dw_tree_set_data(HWND handle, HWND item)
5848 {
5849 TVITEM tvi;
5850 void **ptrs;
5851
5852 tvi.mask = TVIF_HANDLE;
5853 tvi.hItem = (HTREEITEM)item;
5854
5855 if(TreeView_GetItem(handle, &tvi))
5856 {
5857 ptrs = (void **)tvi.lParam;
5858 return ptrs[1];
5859 }
5860 return NULL;
5861 }
5862
5863 /*
5842 * Sets this item as the active selection. 5864 * Sets this item as the active selection.
5843 * Parameters: 5865 * Parameters:
5844 * handle: Handle to the tree window (widget) to be selected. 5866 * handle: Handle to the tree window (widget) to be selected.
5845 * item: Handle to the item to be selected. 5867 * item: Handle to the item to be selected.
5846 */ 5868 */