|
-
May 15th, 2012, 01:39 AM
#1
Enumerating Child Windows
I have the handle to a 3rd party DialogWindow (lets say 0x10056) now I want to enumerate the handes number of child windows present in that. How can I accompalish this?
Thanks in Advance
-
May 15th, 2012, 01:57 AM
#2
Re: Enumerating Child Windows
Not surprisingly, the function is called EnumChildWindows.
http://msdn.microsoft.com/en-us/libr...=vs.85%29.aspx
-
May 15th, 2012, 02:06 AM
#3
Re: Enumerating Child Windows
 Originally Posted by Alex F
Thanks. Now that I have the list of child windows. I have 2 questions
1) Using WM_GETTEXT can I extract the text from those windows? Whether the child window is a label, editbox, radiobutton, checkbox etc?
2) Is there a way I can even get the positions of those windows? For example within a Window I have marked an area using CRect. I have to extract the child windows that lie only within that rectangle area. So how can it be accompalished?
Thanks in Advance
-
May 15th, 2012, 02:40 AM
#4
Re: Enumerating Child Windows
1. GetWindowText
http://msdn.microsoft.com/en-us/libr...=vs.85%29.aspx
With one exception: This function cannot retrieve the text of an edit control in another application.
2. GetWindowRect
http://msdn.microsoft.com/en-us/libr...=vs.85%29.aspx
-
May 15th, 2012, 02:44 AM
#5
Re: Enumerating Child Windows
 Originally Posted by maverick786us
1) Using WM_GETTEXT can I extract the text from those windows? Whether the child window is a label, editbox, radiobutton, checkbox etc?
I gave you a link to MSJ Q&A article in your another thread. Did you read it?
 Originally Posted by maverick786us
2) Is there a way I can even get the positions of those windows? For example within a Window I have marked an area using CRect. I have to extract the child windows that lie only within that rectangle area. So how can it be accompalished?
Doesn't GetWindowRect API work?
There is also MFC CRect class with a lot of useful methods such as PtInRect and others...
Victor Nijegorodov
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|