[DUG] Number of controls on a parent control

Edward Huang edwardh at slingshot.co.nz
Wed Oct 1 18:30:26 NZST 2008


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/1972ff4e/attachment.html 


More information about the Delphi mailing list