API "EnumDisplayDevices"

Started by eugesippe, July 17, 2024, 13:57:30

Previous topic - Next topic

eugesippe

HI,

Is use API " GetSystemMetrics" to know how many screen are connected to my computer:

SM_CMONITORS=80
numMonitors% = GetSystemMetrics(SM_CMONITORS)

And it's works nice,  numMonitors% contain number of monitors...

But...

I would use API " "EnumDisplayDevices" to know rez of each screen:

 "EnumDisplayDevices%( hDC% , num% , pEnum* , dwData* ) : EnumDisplayDevices"

I put it in "user32.decls", but dont know how to use it ?

Thanks for your help :)

eugesippe