Original Post
Hello,
I am trying to do a simple task by finding out which item is Selected, more than that, the selected number. For example the first item will be 0, the next 1. I am using the following code so far:
[edited by - BlueDev on September 9, 2003 9:50:49 PM]
int num; HWND hWnd, hTree; HTREEITEM hItem, Selected; // num equals selected number hTree = GetDlgItem(hWnd, IDTREE); Selected=(HTREEITEM)SendMessage(hTree,TVM_GETNEXTITEM,TVGN_CARET,(LPARAM)Selected); num = TreeView_GetItem(hTree, Selected);Now when I do that they all come out to be 1 for some reason, maybe cause TreeView_GetItem returns BOOL. Is there a function I can use that will actually work as in the first item selected is 0, the third item 3 and so on? Thank your for your time. - BlueDev
[edited by - BlueDev on September 9, 2003 9:50:49 PM]