-
February 14th, 2006, 09:32 PM
#1
Get client area from another app window
I need to get access to the client area of another window (ie from a window *not* from my program) in order to read the graphical data.
- what is the way to do that provided that I know the name (title) of the window?
Thx
-
February 15th, 2006, 12:58 AM
#2
Re: Get client area from another app window
You can use FindWindow to get the handle of the window.
Once you get the handle of the window you can use GetClientRect or GetWindowRect according to your need.
-
February 15th, 2006, 02:34 AM
#3
Re: Get client area from another app window
Originally Posted by Mercantilum
I need to get access to the client area of another window (ie from a window *not* from my program) in order to read the graphical data.
- what is the way to do that provided that I know the name (title) of the window?
Thx
What kind of data you want to get for the window? Textual? Graphical? What kind of window is that?
Cheers
-
February 15th, 2006, 03:13 AM
#4
Re: Get client area from another app window
golanshahar: it's in my initial post.... read it again
haricmon: thanks. but you missed the FindWindowEx allowing search of child windows. you are the nearer from the solution (that i didn't know initially, but had to find the answer myself in the meantime
-
February 15th, 2006, 03:24 AM
#5
Re: Get client area from another app window
Originally Posted by Mercantilum
golanshahar: it's in my initial post.... read it again
Sorry missed that .
What kind of graphical information you want to get? You want to capture images from that window?
Cheers
-
February 15th, 2006, 10:08 AM
#6
Re: Get client area from another app window
Originally Posted by golanshahar
What kind of graphical information you want to get? You want to capture images from that window?
Cheers
Hi... actually everything is graphic at the window client level ... I will use GetClientRect etc... to get the data which is actually a graphic
-
February 15th, 2006, 12:09 PM
#7
Re: Get client area from another app window
There are many ways to get the client data. FindWindow, FindWindowEx, EnumWindows, EnumChildWindows and more gets the top or child windows. From there use the other windows functions to get other data (such as GetClientRect).
If you know the process id, use the EnumXXX methods to restrict the search to a specific process. This method is more reliable (so you don't accidentally grab the 'wrong' window from a process you aren't interested in).
Another way to increase the reliability is to specify the window class along with the title.
If I missed anything here, please don't chastise me - I'm just trying to help.
Arjay
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
|