From: Steve on
I am working on an app that will augment the functionality of a
comercial application I use. In order to ensure my "helper" app gets
correct information I was going to read some information from the
other apps UI. There is one specific control on the main window which
is (according to Spy++) a simple windows Edit control. However I can
not find a way to read the text that is in the box. Not only that but
Spy++ also shows the box to be empty when infact there is text in it.
The box acts just as one would expect an Edit (TextBox) window to
(context menus etc.) but the text is somehow hidden.

Does anyone know how this ispossible? It really does not matter for
this app, I have just decided to key in the value into both the main
app and my "helper" app (this ofcoarse leaves open the opportunity for
type-os but oh well. I am just curious as to how this (hiding the
text) is acomplished.

Thanks,
Steve
From: Bill McCarthy on
Hi Steve,

"Steve" <sredmyer(a)rfcorp.com> wrote in message
news:ac1fca17-9551-4f7b-8620-0bdd968796c5(a)n33g2000pri.googlegroups.com
> I am working on an app that will augment the functionality of a
> comercial application I use. In order to ensure my "helper" app gets
> correct information I was going to read some information from the
> other apps UI. There is one specific control on the main window which
> is (according to Spy++) a simple windows Edit control. However I can
> not find a way to read the text that is in the box. Not only that but
> Spy++ also shows the box to be empty when infact there is text in it.
> The box acts just as one would expect an Edit (TextBox) window to
> (context menus etc.) but the text is somehow hidden.
>
> Does anyone know how this ispossible? It really does not matter for
> this app, I have just decided to key in the value into both the main
> app and my "helper" app (this ofcoarse leaves open the opportunity for
> type-os but oh well. I am just curious as to how this (hiding the
> text) is acomplished.
>

If WM_GetText doesn't work then it probably isn't an edit box nor rich edit.
I haven't tried it, but I'm perhaps they are not returning the text when
they get a WM_GetText message, but I'm pretty sure they would then have to
do a custom paint. And that of course is the alternative: the control maybe
all custom painted on key events.

From: mayayana on

> Does anyone know how this ispossible?

You might check the class name given in Spy++.
Maybe it's notr really a textbox. That's not unusual.
At one point someone was looking to read the URL
in the Firefox address bar and it turned out that none
of that was actually a window. It was all painted.


From: Steve on
On Dec 23, 7:19 pm, "mayayana" <mayaXXy...(a)rcXXn.com> wrote:
> > Does anyone know how this ispossible?
>
>  You might check the class name given in Spy++.
> Maybe it's notr really a textbox. That's not unusual.
> At one point someone was looking to read the URL
> in the Firefox address bar and it turned out that none
> of that was actually a window. It was all painted.

As I said in my origianl post. I did just that and Spy++ says the
class is "Edit" hence my confusion.

Steve
From: Bill McCarthy on
Hi Steve,

"Steve" <sredmyer(a)rfcorp.com> wrote in message
news:af6f1a1e-619f-4378-b9bb-e959d1977ee6(a)o4g2000pra.googlegroups.com
> On Dec 23, 7:19 pm, "mayayana" <mayaXXy...(a)rcXXn.com> wrote:
>>> Does anyone know how this ispossible?
>>
>> You might check the class name given in Spy++.
>> Maybe it's notr really a textbox. That's not unusual.
>> At one point someone was looking to read the URL
>> in the Firefox address bar and it turned out that none
>> of that was actually a window. It was all painted.
>
> As I said in my origianl post. I did just that and Spy++ says the
> class is "Edit" hence my confusion.
>


I just did a quick test. Excuse the .Net code, but it shows the concept
easiest:

Class TextBoxEx : Inherits TextBox

Private Const WM_GETTEXT As Int32 = &HD

Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
If m.Msg <> WM_GETTEXT Then
MyBase.WndProc(m)
End If
End Sub

End Class

That's basically subclassing a textbox, and swallowing any WM_GETTEXT
requests. The textbox works fine, but Spy can't read the text.

 |  Next  |  Last
Pages: 1 2 3 4
Prev: APPDATA folder question
Next: Alternatives