CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 1 of 1
  1. #1
    Join Date
    Feb 2002
    Posts
    42

    Mobile PC Display Switching

    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...ledisplay.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
    Attached Files Attached Files
    Last edited by lily311; March 7th, 2005 at 02:17 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured