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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
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

_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: [email protected]
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe

Reply via email to