Solved

Get the hWnd of all screens the pc uses.

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

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
This article will show, step by step, how to integrate R code into a R Sweave document
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

622 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