• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 198
  • Last Modified:

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: http://home.foni.net/~winter/download/PrcMemMgrTest.zip

Here is a sample of how to use it (with a listview)
Eddie Shipman
Eddie Shipman
1 Solution
Wim ten BrinkCommented:
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.

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Wim ten BrinkCommented:
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

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now