> How can I read the caption of label contained in a different
> application thru the applications handle. I'm using GetWindowText and
> GetClassName to get the windows handle of the applications main or
> child form, but EnumChildWindows doesn't enum the TLabels contained
> on the form.
If the app isnt a delphi app, or a borland derivitive, it wont be
TLabel, if you have a look with microsoft spy program it can show you
often however, I think you cant easily tell.
> How can I read the caption of label contained in a different
> application thru the applications handle. I'm using GetWindowText and
> GetClassName to get the windows handle of the applications main or
> child form, but EnumChildWindows doesn't enum the TLabels contained
> on the form.
In addition to what Liz said, if the other application is made with
Delphi or CPPB, you won't be able to find TLabels using
EnumChildWindows because they are descended from TGraphicControl and
don't have window handles (unlike the progeny of TWinControl).
--
Joe
How can I read the caption of label contained in a different application
thru the applications handle. I'm using GetWindowText and GetClassName to
get the windows handle of the applications main or child form, but
EnumChildWindows doesn't enum the TLabels contained on the form.
Thanks in advance.
-Jack
The other app is a Delphi app, and yes TLabel's do have window handles. So
the question is: Is there any way to get the label caption contained on a
given windows handle.
Thanks
-Jack
"Joseph Donnelly" <j_j_do...@yahoo.com> wrote in message
news:xn0e0wsl...@forums.borland.com...
Yes, simply send the WM_GETTEXT message.
> The other app is a Delphi app, and yes TLabel's do have window
> handles. So the question is: Is there any way to get the label
> caption contained on a given windows handle.
Jack,
I beg to differ, at least through D6. There is no handle property
(which is the window handle) in a TLabel. As mentioned before, they are
descended from the TGraphicControl branch rather than the TWinControl
branch off of TControl. As there is no Window handle for the TLabel,
EnumChildWindows will not retrieve the non-existant handle label.
Perhaps the other Delphi application needs to use a TStaticText (which
does have a window handle)?
--
Joe
Andrew,
What WindowHandle do I pass to SendMessage to accomplish this.
Thanks
-Jack
"Andrew Ryazanov" <au...@rin.ru> wrote in message
news:425c...@newsgroups.borland.com...
> Perhaps the other Delphi application needs to use a TStaticText (which
> does have a window handle)?
>
> --
> Joe
Joe,
This would be of great help if I have control over the development of the
other program. As it is the other program is not developed by us, we are
just trying to get the current information displayed so we could develop a
so called add-on.
Thanks
-Jack
The handle of the child control you need. I supposed you enum them using
EnumChildWindows and have their handles.