My computer has a single graphics card. I have three monitors plugged in, and my Windows desktop spreads across the three monitors. When I right-click on the desktop and select "screen resolution", the dialog box that appears has a combobox "Display", which knows the make and model of each monitor. So far, so good.
I’m writing an application using Direct3D 9, where I would like to present the user with the same choice of monitors. IDirect3D9::GetAdapterCount
returns 3, one for each monitor. If I all IDirect3D9::GetAdapterIdentifier
for each one, the D3DADAPTER_IDENTIFIER9.Description
field describes my graphics card (e.g. "NVIDIA GeForce GTX 770") rather than the monitor (e.g. "Acer B243HL").
I tried calling IDirect3D9::GetAdapterMonitor
to get an HMONITOR
, and then GetMonitorInfo
on that, but the string was of the form "\.\DISPLAY3".
Is there a function I can call that will return a string describing my monitor, the same as in the Windows screen resolution menu? I'm limited to DirectX version 9.
Edited to add:
I had previously tried using EnumDisplayDevices, but the closest string I ever got in DISPLAY_DEVICE.DeviceString
was "Generic PnP Monitor". Windows' own screen resolution settings have the exact make and model.
I'm on Windows 7.