Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Enumerating group box windows/controls of another proccess

Posted on 2004-08-26
Last Modified: 2010-04-24
I'm writting a program that will automaticly do a task in another program... everything was great until I got to the part of reading the other program's output.

The program has a group box that has several static labels (atleast they look like that) inside and I wan't to read the text on those labels, how do I do it?

...I was using FindWindowEx/EnumChildWindow which worked perfectly for everything else but I can't get the handles/text of those controls... they event don't appear in enumchildwindows
Question by:Interghost
LVL 55

Expert Comment

by:Jaime Olivares
ID: 11909789
Have you tried with GetDlgItem()?
You have to scan item IDs from 1 to 32767 until the function returns a valid HWND.
LVL 16

Expert Comment

ID: 11910489
Try to look with Spy++ wheter they are windows or not and if they are, whose children are they.

Author Comment

ID: 11916276
I tried Spy++ and can't find them

re: jamies.... I don't understand what do u have in mind?... that would be too complicated, I would have to go through all the numbers with all the window's as parent combinations cause I don't know which is his parent....and that could also not work cause even If I find it I wouldn't know that that is the one I'm looking for

BTW I tried another idea...setting up a hook and monitoring WM_SETTEXT but nothing... my best guess is that the letters are beeing drawn manualy
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.


Author Comment

ID: 11916316
Update... after disassembly I found references to ExtTextOut so my suspicion is probably confirmed... so now is there any way to read that text?
LVL 16

Expert Comment

ID: 11919702
I'm afraid there is no possibility of this. The GDI hooking is hard to implement, on win9x there was some kind of hooking API, SetDDIHook(..) function, that is no more available on NT and above (2k, xp)

Author Comment

ID: 11922172
I've managed to do it using screen snaps and, I guess I could call it, simple OCR... so admin please delete the question

Thnx for the replys
LVL 16

Expert Comment

ID: 12099888
I think a PAQ/refund would be better (some valuable info can be found here).

Accepted Solution

GhostMod earned 0 total points
ID: 12139776
PAQed, with points refunded (250)

Community Support Moderator

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Error when running VS apps 14 124
How to 4 53
'System.Data.DataRow' does not contain a property with the name 'AUTONUM' 10 71
Convert money to nchar 4 68
The following diagram presents a diamond class hierarchy: As depicted, diamond inheritance denotes when two classes (e.g., CDerived1 and CDerived2), separately extending a common base class (e.g., CBase), are sub classed simultaneously by a fourt…
In Easy String Encryption Using CryptoAPI in C++ (http://www.experts-exchange.com/viewArticle.jsp?aid=1193) I described how to encrypt text and recommended that the encrypted text be stored as a series of hexadecimal digits -- because cyphertext may…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question