Click here to Skip to main content
15,892,005 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Sorting CListCtrl with LVS_OWNERDATA property? Pin
bosfan25-Apr-07 4:15
bosfan25-Apr-07 4:15 
QuestionHELP! About CoUninitialize() Pin
kcynic25-Apr-07 3:08
kcynic25-Apr-07 3:08 
AnswerRe: HELP! About CoUninitialize() Pin
Sam_c25-Apr-07 3:15
Sam_c25-Apr-07 3:15 
GeneralRe: HELP! About CoUninitialize() Pin
kcynic25-Apr-07 5:18
kcynic25-Apr-07 5:18 
AnswerRe: HELP! About CoUninitialize() Pin
prasad_som25-Apr-07 3:21
prasad_som25-Apr-07 3:21 
GeneralRe: HELP! About CoUninitialize() Pin
kcynic25-Apr-07 12:16
kcynic25-Apr-07 12:16 
AnswerRe: HELP! About CoUninitialize() Pin
prasad_som26-Apr-07 21:01
prasad_som26-Apr-07 21:01 
QuestionTreeView_GetItem() macro problem Pin
Syamlal S Nair25-Apr-07 2:52
Syamlal S Nair25-Apr-07 2:52 
hi,
I am trying out a win32 application which will automate some operations (like click on Next button on a window).

My issue is a treeview. I want to get the text of a node inside the treeview. For that I am using the following code.

//**************************************

HTREEITEM hRoot = TreeView_GetRoot(hwnd);

HTREEITEM hChild;
HTREEITEM hNextItem;

if (hRoot == NULL)
{
MessageBox(NULL, "Error: Problem with tree view ", "Error", 0);
}
else
{
hChild= TreeView_GetNextItem(hwnd,hRoot,TVGN_CHILD);
hNextItem= TreeView_GetNextItem(hwnd,hChild, TVGN_NEXT);
}
//TreeView_SelectItem(hwnd,hChild); TreeView_SelectItem(hwnd,hNextItem);

char name[100];
TVITEM myItem;
myItem.mask=TVIF_TEXT|TVIF_HANDLE;
myItem.hItem=hNextItem;
myItem.pszText =name;
myItem.cchTextMax =99;

TreeView_GetItem(hwnd,&myItem);

//::SendMessage(hwnd,WM_GETTEXT,(WPARAM) 0,(LPARAM)myItem.pszText);

MessageBox(NULL, name, "Automation", 0);
//*************************************

But it is not retreiving the text. It will do upto selecting the node, But GetItem function is failing.
Pls give a solution

Thanks in advance.

SYAMLAL

QuestionRe: TreeView_GetItem() macro problem Pin
prasad_som25-Apr-07 3:07
prasad_som25-Apr-07 3:07 
AnswerRe: TreeView_GetItem() macro problem Pin
Syamlal S Nair25-Apr-07 3:20
Syamlal S Nair25-Apr-07 3:20 
AnswerRe: TreeView_GetItem() macro problem Pin
prasad_som25-Apr-07 3:32
prasad_som25-Apr-07 3:32 
GeneralRe: TreeView_GetItem() macro problem Pin
Syamlal S Nair25-Apr-07 3:38
Syamlal S Nair25-Apr-07 3:38 
GeneralRe: TreeView_GetItem() macro problem Pin
prasad_som25-Apr-07 3:47
prasad_som25-Apr-07 3:47 
GeneralRe: TreeView_GetItem() macro problem Pin
Syamlal S Nair25-Apr-07 3:54
Syamlal S Nair25-Apr-07 3:54 
GeneralRe: TreeView_GetItem() macro problem Pin
Syamlal S Nair25-Apr-07 3:41
Syamlal S Nair25-Apr-07 3:41 
GeneralRe: TreeView_GetItem() macro problem Pin
Syamlal S Nair25-Apr-07 3:42
Syamlal S Nair25-Apr-07 3:42 
QuestionC++ Interface Pin
Anka_Ame25-Apr-07 2:10
Anka_Ame25-Apr-07 2:10 
AnswerRe: C++ Interface Pin
GuyM25-Apr-07 2:24
GuyM25-Apr-07 2:24 
GeneralRe: C++ Interface Pin
Anka_Ame25-Apr-07 2:29
Anka_Ame25-Apr-07 2:29 
AnswerRe: C++ Interface Pin
David Crow25-Apr-07 2:32
David Crow25-Apr-07 2:32 
GeneralRe: C++ Interface Pin
Anka_Ame25-Apr-07 2:41
Anka_Ame25-Apr-07 2:41 
QuestionRe: C++ Interface Pin
David Crow25-Apr-07 2:48
David Crow25-Apr-07 2:48 
AnswerRe: C++ Interface Pin
Anka_Ame25-Apr-07 2:49
Anka_Ame25-Apr-07 2:49 
QuestionRe: C++ Interface Pin
David Crow25-Apr-07 2:53
David Crow25-Apr-07 2:53 
GeneralRe: C++ Interface Pin
prasad_som25-Apr-07 2:53
prasad_som25-Apr-07 2:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.