-----Original Message-----
>From: John Barrat <j.bar...@netcom.co.uk>
>Sent: Jun 21, 2010 4:24 PM
>To: delphi@elists.org
>Subject: Looking for some WinAPI help
>
>I want to get the window properties of a 3rd party SDI application.
>
> 
>
>I know the handle to the Application, I get that through using the
>GetWindow() and GetWindowText() API calls but is there a way of discovering
>the handles to other windows in the application - e.g. the applications
>editing area.  Would the GW_CHILD command parameter for example get me all
>the windows in the client area of the application window?

GetWindow()/GetWindowText() by itself is not going to get you where it sounds 
like you want to go. 

The usual approach for what you describe is once you have the parent window 
handle, you enumerate all of its registered child windows using the 
EnumChildWindows() API.

You pass a callback function reference to EnumChildWindows() in which you can 
examine the characteristics of the child windows returned by using the 
GetWindowLong() API.

Note that this parent->child window relationship is hierarchical; you may have 
to call EnumWindows() again on child window handles you receive from the parent 
(and then on those handles as well, etc., etc.) in order to drill down to the 
window(s) of actual interest.

HTH

Stephen Posey
stephenlpo...@earthlink.net 

_______________________________________________
Delphi mailing list
Delphi@elists.org
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi

Reply via email to