I'm working on a small program that automates using another program. I have no problem using FindWindow(Ex) and getting/setting text to all of the other controls on the software, but am hitting a road block with the Edit control they are using. Using Spy++, I can find the control without issues, and can get/set the text to it, but it's not actually visible. Is it a custom control? Can I access the different controls inside of a custom control? I've attached some screen shots to show what is happening.
Using Spy++ to find the class of the control:
But it doesn't see the caption "sometext"
Now I'll set the text to "testing"
It reads the text, but it's not what is actually displayed. The control still displays "sometext" but Spy++ and my own GetText method sees "testing"
Finally, I tried closing it to see if it was covering a control or something and this is what I saw
It does the typical minimize/close but there is a "textbox" type of thing still visible. Is it a custom control they constructed that has a control inside of it? Am I able to get/set the text there that says "sometext"? Also, I browsed and searched the Spy++ window for "sometext" (after refreshing it, of course), and it was no where to be found.
I'm currently doing it by setting focus to it, which activates the cursor in the field, and using sendkeys to clear the field and populate new text. It works fine, but I really don't want to use sendkeys in case the focus somehow gets lost during the keypresses.
Also, trying to keep it .NET 2.0 compatible if possible. Thanks!