Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 26th, 2003, 07:38 PM
Matrixx11011 Matrixx11011 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 2 Matrixx11011 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy Controlling Windows Controls using API

OK I am using the FindWindowEx and EnumerateChild and Sendmessage APIs to control a couple of combo boxes. I have been able to control them unless there is another control with the same classname in the same window. The controls do not have any text to identify them either other than the class name. For some reason, I cannot locate its handle

First I am locating the window that I need. For instance an IE window's address bar. Then I am Enumerating through the Child Controls Until I locate the class name that I need (ie. RebarWindow32, then ToolbarWindow32, ComboBox32, ComboBox, and finally the Edit Class)
I then use the SendMessage API to read or write the contents of the text box and it works great! Unless there is one of those search bars installed, like Google or a Websters Dictionary Search bar or something. They have the same class name and it only recognizes one (always the wrong one).
I am having this same problem in controlling another application I am writing this for in which there are several Combo Boxes on an SSTab control. I used APISpy 2.7 and it gave me the classnames which are all the same as well as nothing for the controls text.

Any Idea how I can locate the handle for controls that seem Identical? I thought of testing for the Top, Left Width and Height properties but this will not work in IE as they can take any place/size.

Any suggestions would be greatly appreciated.

Thanx!!

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > Controlling Windows Controls using API


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway