Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

retrieve multiple display information using win32/C++ [duplicate]

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.

like image 439
user313644 Avatar asked Dec 23 '22 04:12

user313644


2 Answers

EnumDisplayMonitors should get you started.

like image 121
Billy ONeal Avatar answered Dec 28 '22 09:12

Billy ONeal


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.

like image 38
Hans Passant Avatar answered Dec 28 '22 08:12

Hans Passant