Answer the question
In order to leave comments, you need to log in
WInAPI and TVirtualStringTree
My respects, gentlemen. I had a chance to write a program to interact with someone else's software. This software has a TVirtualStringTree control from which you need to get text. And now, as they say, "And what I just haven't tried." With this control it is impossible to do anything at all. Google does not help, similar problems did not find a solution.
What I have tried:
- Get the root of this tree
RootTree := SendMessage(HandleTree, TVM_GETNEXTITEM, TVGN_ROOT, 0);
GetWindowThreadProcessID(HandleTree, @ProcessID);
ProcessHanlde := OpenProcess(PROCESS_ALL_ACCESS, False, ProcessID);
PItem := VirtualAllocEx(ProcessHanlde, nil, SizeOf(TV_ITEM), MEM_RESERVE or MEM_COMMIT, PAGE_READWRITE);
with LItem do
begin
hItem := HTreeItem(RootTree);
mask := TVIF_HANDLE;
end;
WriteProcessMemory(ProcessHanlde, PItem, @LItem, SizeOf(LItem), Dummy);
if TreeView_GetItem(HandleTree, PItem^) then
begin
ReadProcessMemory(ProcessHanlde, PItem, @LItem, SizeOf(LItem), Dummy);
end;
SomeItem := SendMessage(HandleTree, TVM_GETNEXTITEM, TVGN_CHILD, RootTree);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question