Enable/Disable multiple monitors via Win32 API or NVidia API?
I'm trying to write a small utility that will enable/disable monitors under Windows 7 with my nVidia graphics card. (ie. "Extend the desktop onto this monitor", etc)
The reason is that my nVidia Geforce GTX 480 has three outputs (2x DVI, 1x Mini-HDMI) but only allows two to be active at any given time so I need to enable/disable monitors when I want to switch to my TV (HDMI) display.
The Win32 API function EnumDisplayDevices isn't working because it doesn't show disabled monitors.
nVidia provides an API (NVAPI) and has functions to enumerate all monitors (even disabled ones) and you can enable a monitor but you can't disable a monitor. (I开发者_开发技巧'm referring to NvAPI_CreateDisplayFromUnAttachedDisplay)
UltraMon seems to have figured out how to perform this but I can't find any information.
I think that if 2 out of three displays are already connected, the 3rd one will not be detected. the card will stop listening for a new hardware. you have to manually take out the cable , and then insert a new one in a different port. unless there is a way to "eject" the connection, similar to a usb storage device.
精彩评论