Hi,
I had a tree view where i had populated it with some values.Now my Tree view has a Root node and a sub node for it and in turn the sub node consists of three child items and i had a button in a dialog beneath the tree view and when i select the sub node that had 3 child items i must get a copy of that which will be pointing out to the root node.
[+]America
.
.
[+]INDIA
..AP
..MP
..MH
and now when i select "INDIA" and press the button then i must be able to add a copy of that to "America" and which would look like,
[+]America
. .
. .
. .
. [+]INDIA
. ...AP
. ...MP
. ...MH
.
.
.
....[+]INDIA[2]
....AP[2]
....MP[2]
....MH[2]
This is what i have to get but when i am clicking the button it is just adding the INDIA and i was unable to get the child item i.e,(AP,MP,MH).
I am getting the current selected item by sending message using SendDlgItemMessage(hWnd,IDC_TREE,TVM_GETITEM,TVGN_CARET,(LPARAM)&tvItem);
I tried getting the child item by sending one more message i.e,
SendDlgItemMessage(hWnd,IDC_TREE,TVM_GETITEM,TVGN_CHILD,(LPARAM)&tvItem);
but it is still showing the selected item but not the child items text value .
As i am new win32 programming got stuck over here .
Can anyone kindly help me .
Thanks in advance,
siva V