Getting the lParam associated to a treeview's item?
Hello, I'm trying to get the 32-bit value associated with an item of a treeview control, but I'm not able to find the way of do it; I'm able to get the pszText associated to an item, so the item pointer (HTREEITEM) is right. I have been reading on the Win32 Prog Reference and find the next explanation referred to the struct TV_ITEM used in the TVM_GETITEM message:
So can I only get the text and the state?
Pointer to a TV_ITEM structure that specifies the information to retrieve and receives information about
the item. When the message is sent, the hItem member identifies the item to retrieve information about
and the mask member specifies the attributes to retrieve.
If mask specifies the TVIF_TEXT value, the pszText member must contain the pointer to the buffer that
receives the item text and the cchTextMax member must specify the size of the buffer.
If mask specifies the TVIF_STATE value, the stateMask member indicates which item states are to be returned.
That's what I do to get the item:
From that code I get the item text in the first alert, but "0, 0" on the second alert. I'm afraid that as the W32 Prog Ref says, the only 'getable' values are the text and the state. I'm doing it right, or there's a different way than TVM_GETITEM to get the lParam associated to an item?
Thank's in advance.