Re: Determining physical VGA/DVI port a monitor is connected to
- From: edmund.szeto@xxxxxxxxx
- Date: Mon, 10 Mar 2008 13:49:11 -0700 (PDT)
I've found an easier method of achieving what I want. Basically, I
need to know which monitor corresponds to which of the displays. This
is the method that I came up with (here for completeness):
1. Use the usual EnumDisplayDevices() method to get a DISPLAY_DEVICE
struct for the monitor.
2. Parse the last part of the DeviceKey member in DISPLAY_DEVICE
struct, starting from the first '{'.
3. Use SetupDiGetClassDevs() with GUID_CLASS_MONITOR, then use
SetupDiEnumDeviceInfo() to get all monitors
4. For each monitor, look at the registry entry
5. Look for a "Driver" REG_SZ value
6. Compare that value to the parsed DeviceKey value to find a match
7. Then from looking at the EDID information, you can determine which
monitor is used as the primary, secondary, etc monitor
Seems like a whole lotta work :( I bet there's an easier way out
there.. o well
Cheers,
Edmund
On Mar 6, 7:00 pm, edmund.sz...@xxxxxxxxx wrote:
Hi All,
I am wondering if its possible to determine in user mode which video
port a monitor is connected to. For example, say I have a nVidia
Quadro FX 1600M video card that has two DVI ports, can I tell which
monitor is connected to which of the DVI ports?
I have already looked at the EnumDisplayDevices() and
EnumDisplaySettings() functions. They are useful for getting the
position/resolution of the monitors, but I cannot tell which port each
monitor is connected to.
Thanks in advance!
Edmund
.
- References:
- Determining physical VGA/DVI port a monitor is connected to
- From: edmund . szeto
- Determining physical VGA/DVI port a monitor is connected to
- Prev by Date: Capture an application window under vista didnt works correctly
- Next by Date: Re: Layered window memory pool
- Previous by thread: Determining physical VGA/DVI port a monitor is connected to
- Next by thread: AlphaBlend(), UpdateLayeredWindow() and 16-bit color mode
- Index(es):
Relevant Pages
|