Click to See Complete Forum and Search --> : Mobile PC Display Switching


lily311
March 4th, 2005, 06:09 AM
Hi, gurus:

This problem has troubled me for one week! :(

My purpose is programmatically switching video output devices, such as LCD, VGA, TV...

reference article:
http://www.microsoft.com/whdc/device/display/mobiledisplay.mspx

By now, I can enum all attached monitors by calling EnumDisplayDevices twice(first calling returns AdapterName, second calling returns MonitorName), and get MonitorNames like:
\\.\DISPLAY1\Monitor0
\\.\DISPLAY1\Monitor1

I tried to enable the switch using ChangeDisplaySettingsEx, but failed. The MonitorName can't be used as the first param of ChangeDisplaySettingsEx, which returns DISP_CHANGE_BADPARAM. Only AdaptorName can work, but that's not what I want. Monitor, not Adapter, is my real concern.

Does that mean Windows API has no function call for Video Output Switch? Since the switching is actually performed by ACPI BIOS & Video Port Driver, can I have other ways to do so?

Code attached...


Thanks for any help! :)
Lily