[DUG] Number of controls on a parent control
Trevor
trevorj at ihug.co.nz
Wed Oct 1 18:48:56 NZST 2008
Edward,
What an elegant solution!
Of course it will miss out any child controls that don't have a window
handle, but there's not really anything that you can do with them from an
external program anyway.
Trevor
_____
From: delphi-bounces at delphi.org.nz [mailto:delphi-bounces at delphi.org.nz] On
Behalf Of Edward Huang
Sent: Wednesday, 1 October 2008 7:30 p.m.
To: NZ Borland Developers Group - Delphi List
Subject: Re: [DUG] Number of controls on a parent control
Hi Jeremy,
If you got the window's handle, you can use the Windows API EnumChildWindows
to enumerate all child windows.
Look at Windows API help file, you should be able to figure out how to use
the API.
Edward
-----Original Message-----
From: delphi-bounces at delphi.org.nz [mailto:delphi-bounces at delphi.org.nz]On
Behalf Of Jeremy Coulter
Sent: Tuesday, 30 September 2008 11:22
To: NZ Borland Developers Group - Delphi List
Subject: [DUG] Number of controls on a parent control
Hi All.....before you all say "mycontrol.controlcount" I cant do that :-)
What I am doing is trying to get some text from a control on a control that
is on another application.
So I need to send a windows message to get the control count.
The reason for this is, the name of the control I am trying to get hte name
of is different every time.
Basically I need to do this :-
//find the parent window - done
//find the parent control - done
//loop the controls on the parent control's child controls
//get the text from the control I want to look at.
I hope what I am trying to do is res. clear :-)
Jeremy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20081001/c5aaeda5/attachment.html
More information about the Delphi
mailing list