Grab TreeView from another app.

Can anyone convert the PrcMemMgrTestForm unit by Michael Winter
to grab a TREEVIEW instead of a ListView?

Get the source for it here:

Here is a sample of how to use it (with a listview)
LVL 26
Eddie ShipmanAll-around developerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Wim ten BrinkSelf-employed developerCommented:
Listviews and Treeviews are special Windows classes and Delphi just created a wrapper around those Windows classes. This source uses the WINAPI Listview commands from the Commctrl unit to retrieve the data from another process. Or, even simpler... Delphi created some API-like functions around the SendMessage system to pretend there's some kind of API here. To convert it for a treeview, you should look in the Commctrl for Delphi's treeview-related functions. E.g. TreeView_GetRoot(), TreeView_GetChild(), TreeView_GetFirstVisible(), etc...

Too bad it's a bit too complex for me to try to convert it. I dislike GUI's anyway. I do more with background tasks and unattended processes.
Eddie ShipmanAll-around developerAuthor Commented:
I've already tried to use the Treeview Macros when EnumChildWindows to get a treeview. No go.
I did not try to modify the aforementioned units to use TreeView messages instead.

BTW, The TreeView_Get... and TreeView_Set.. macros are also wrappers for the SendMessage
functions instead of actually calling the real TreeView_Get/Set... macros.
Eddie ShipmanAll-around developerAuthor Commented:
I don't think any of the treeview macros will work for this because of that.
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

Wim ten BrinkSelf-employed developerCommented:
Closing and refund are fine by me. :-)
I'd suggest to PAQ this question, though. Maybe in the future someone might find an answer for it, or it could be useful for someone else.
Thank you, Workshop_Alex. I have changed the closing recommendation to PAQ / Refund.

Community Support Moderator
Question PAQ'd
350 points refunded.

Community Support Moderator

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.