|
-
March 29th, 2007, 02:46 AM
#1
CTreeView control - problem in recognize item that was click.
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.
-
March 29th, 2007, 04:49 AM
#2
Re: CTreeView control - problem in recognize item that was click.
You should get the selected item using TreeView_GetItem (with TVITEM parameters set for selected item) directly after the click/double-click (in correspondent message handlers)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|