Solved

Get the hWnd of all screens the pc uses.

Posted on 2014-01-27
3
271 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

Independent Software Vendors: 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

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 …
When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

752 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