Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FindWindowEx help needed

Status
Not open for further replies.

nomaam22

Programmer
Oct 6, 2006
9
CA
Hello:

I am using Vb.NET 2008, working in a windows form.

I am using FindWindow and FindWindowEx to locate handles in order to grab text from controls within another application using WM_GETTEXT.

All is working well, but I am having a problem when there are many controls with no names and the same class names. I am unsure how to grab the handle of any control after the first control. I have tried using EnumChildWindow but it isn't working out. I am sure there is a way to set a "start" point from where you want to start your search of sub handles.

I have included a snapshot of an example using VisualUIAVerify to capture the control information.


In the photo you can see all of the sub handles are simply called "pane" and have all the same class names with no captions. Obtaining text from the first child "pane" works fine. But I would like to grab the handle of the fourth "pane" child specifically.

Is there a way you can set which child number you want to grab or start from instead of having to search by class name /caption for all of the handles? There are no captions for any of the handles and the class names are all the same.

Thanks.
 
See if the following post helps you out. I think the control's ID is what you need:




I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top