Hi All,

I need to write some GUI application that uses CTreeView control.
I writing it with using ATL and use method like TreeView_SetItemState, TreeView_InsertItem and extra.
I'm using control attribute of check box --> each item have check box with some string.

I found out that in case of double click on some item i have problem on identify the current item.

What i mean is that in case the double click is on the string that describe the selected item than all work find and i getting the right HTREEITEM --- but in case the double click is on the check box of the selected item then i getting wrong HTREEITEM (!!!).

The method that getting the event return me LPNMHDR pnmh type -- with this type i do casting to
NMTREEVIEW* that will hold me

TVITEM itemOld;
TVITEM itemNew;

None of them are not hold me the info of the right HTREEITEM .

I must have the right HTREEITEM to know which item was selected in case of click event or/and double click event.

I will be happy to get any help to find out the problem.

Thanks.