Is there any way to retrieve information about how many extra displays there are besides the main one, how they are numbered, what the dimensions are, etc? I know this is pretty easy in .net land.
Asked
Active
Viewed 6,428 times
4
-
1The link for "Number of physical monitors attached to a Windows machine?" above is broken. – Laurie Stearn Mar 01 '16 at 09:44
-
This question should probably be marked as a duplicate of https://stackoverflow.com/questions/18022612/enumerating-monitors-on-a-computer. The current duplicate has been deleted after it was migrated to [su]. – Ilmari Karonen Jul 16 '19 at 19:00
2 Answers
5
Use the EnumDisplayMonitors() function, passing NULL for the first 2 arguments. Your callback gets the monitors in numeric order with their virtual location, relative from the main monitor. Negative positions are to the left and top of your main monitor.

Hans Passant
- 922,412
- 146
- 1,693
- 2,536