Valhalla Legends Forums Archive | General Programming | Getting Control Caption

AuthorMessageTime
hismajesty
This is probably pretty easy but I can't figure it out. I'm trying to get the caption of the things boxed in in red Here.

I looked it up in Spy++ and got t he name of the controls and what type of controls they are. They're all text boxes so I was hoping it'd be pretty easy. However, every item in the program uses the same class (TEST_WIN32WND) as opposed to a program like Notepad which has seperate ones and makes it easy :P. Since each control uses the same class how can I say which one I want the caption of? I had planned to use FindWindowEx for the textbox but since the class is widespread that won't work I don't think. I asked a few other people and the best advice I got was from xp - "Get a media player that doesn't suck." Any suggestions?
May 30, 2004, 6:00 PM
K
You need to determine what order the textboxes were created in, and then call FindWindowEx() with the siblings that number of times. Alternatively, you can use a code-generating API spy which will do this for you and generate (unfortunantly VB , but its easily adaptable) the code to grab the handle of the window.
Here's a good one: http://www.patorjk.com/progapispy.htm
May 30, 2004, 8:30 PM
hismajesty
Thanks, I'll look into that.
May 30, 2004, 8:47 PM
Adron
[quote author=hismajesty[yL] link=board=5;threadid=7039;start=0#msg62829 date=1085950076]
Thanks, I'll look into that.
[/quote]

Did it work?
June 8, 2004, 10:06 AM
hismajesty
No.
June 18, 2004, 9:40 PM
Adron
I sometimes use the coordinates to identify which one I'm after.
June 19, 2004, 12:28 AM

Search