Solved

Get the hWnd of all screens the pc uses.

Posted on 2014-01-27
3
262 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
  • 2
3 Comments
 
LVL 30

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 30

Expert Comment

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

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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 use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

746 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now