Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to get an object's handle inside a window?

Posted on 2004-04-12
5
Medium Priority
?
299 Views
Last Modified: 2010-04-01
Hi experts. I would like to know how to enumerate all the objects within a window. There is a certain program I am using that contains a value (the username) in a text box. So, I need to read that text box, and for that I need the handle. I have the window handle, but I don't know how to get the text box's handle. Is there a way to enumerate all the objects? I am quite sure this is possible since I saw some time ago a program that could say all the values inside text boxes.
Thanks a lot.
0
Comment
Question by:ricardodelvalle3
[X]
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
  • 3
5 Comments
 
LVL 19

Expert Comment

by:mrwad99
ID: 10807715
If you are using MFC, you can just say (CEdit Control Name)->GetWindowText(CString)
0
 
LVL 19

Expert Comment

by:mrwad99
ID: 10807742
Oh, sorry, it now sounds like you are not writing the program, but are using it.  Hmm.  In that case I don't think it is possible to get handles to controls of windows that you don't own, so to speak.
0
 
LVL 4

Accepted Solution

by:
bkfirebird earned 800 total points
ID: 10807744
is this application a external ie you don't have the source code for it ?
You can use EnumChildWindows to get a handle for the text box once you know the parent window's handle.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/WinUI/WindowsUserInterface/Windowing/Windows/WindowReference/WindowFunctions/EnumChildWindows.asp
0
 
LVL 19

Expert Comment

by:mrwad99
ID: 10807761
bkfirebird: I stand corrected :)
0
 

Author Comment

by:ricardodelvalle3
ID: 10807901
Excelent bkfirebird!! I'll try it tonight when I get home.
Cheers.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Article by: evilrix
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data defin…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

618 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