Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Get the hWnd of all screens the pc uses.

Posted on 2014-01-27
3
Medium Priority
?
279 Views
Last Modified: 2014-01-28
I am working on a screen capture program and in a loop, i need to get all of the hWnd of each window on the pc. For example, i have four screens i use with my pc. So in the loop i could get the hWnd of each screen. If i am on a pc with only one screen then the loop would only run one time.

I am currently using GetDesktopWindow but that only allows me to capture screen 1.
0
Comment
Question by:Basicfarmer
[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
  • 2
3 Comments
 
LVL 31

Accepted Solution

by:
Zoppo earned 2000 total points
ID: 39814774
Hi Basicfarmer,

AFAIK if you use one desktop spreaded over multiple monitors there's only one desktop window - you can check this using i.e. Spy++ which comes with VisualStudio.

So IMO using GetDesktopWindow is the way to go, you only need to find the areas within the desktop window used per monitor. To do so you can use EnumDisplayMonitors which calls a user defined callback functions once per monitor passing the monitor's rectangle.

Hope this helps,

ZOPPO
0
 

Author Comment

by:Basicfarmer
ID: 39815112
Awesome information, Thanks man...
0
 
LVL 31

Expert Comment

by:Zoppo
ID: 39815139
:o) You're welcome, I'm glad I could help ...
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

Having just graduated from college and entered the workforce, I don’t find myself always using the tools and programs I grew accustomed to over the past four years. However, there is one program I continually find myself reverting back to…R.   So …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
The viewer will learn how to implement Singleton Design Pattern in Java.
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

721 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