Solved

Get the hWnd of all screens the pc uses.

Posted on 2014-01-27
3
267 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 500 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: 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.

Question has a verified solution.

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

If you haven’t already, I encourage you to read the first article (http://www.experts-exchange.com/articles/18680/An-Introduction-to-R-Programming-and-R-Studio.html) in my series to gain a basic foundation of R and R Studio.  You will also find the …
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…
This video teaches viewers about errors in exception handling.
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.

763 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