Thread: About multi-monitors program use SetUp.dll

  1. #1
    Registered User
    Join Date
    Sep 2012
    Posts
    3

    About multi-monitors program use SetUp.dll

    I want use SetUp.dll Get all the monitors power status, resolution, relativeX, relativeY,and if the monitor is unpluged.
    I only know use function
    SetupDiGetDeviceRegistryPropertyW, but i do not know the
    Property param separately to power status, resolution, relativeX, relativeY, anybody can help me??
    what param should i use in function
    SetupDiGetDeviceRegistryPropertyW?

  2. #2

  3. #3
    'Allo, 'Allo, Allo
    Join Date
    Apr 2008
    Posts
    639
    Quote Originally Posted by Codeplug View Post
    Just one thing I noted if the OP takes the code, GetDeviceRegString uses vector::reserve instead of vector::resize for the dynamic buffer.

    And for thread context Gamedev.net - Problem about Multiple Monitors

  4. #4
    Registered User
    Join Date
    Sep 2012
    Posts
    3
    The first link, i have tried, my pc connect two monitors,if i power off one monitor and keep its HDMI cable plugged in,when i test, both Monitors power status is PowerDeviceD0.
    Then if i power off one monitor and unplug HDMI cable,can only detect one monitor, how can i enum all monitors that have plugged in the pc?
    thanks

  5. #5
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    >> GetDeviceRegString uses vector::reserve instead of vector::resize for the dynamic buffer.
    Nice!

    >> how can i enum all monitors that have plugged in the pc?
    If it can be done, I don't know how. It may depend on particular HW and their drivers anyway. I would just write code to gather as much information as you can and start experimenting.

    gg

  6. #6
    Registered User
    Join Date
    Sep 2012
    Posts
    3
    Quote Originally Posted by Codeplug View Post
    >>
    >> how can i enum all monitors that have plugged in the pc?
    If it can be done, I don't know how. It may depend on particular HW and their drivers anyway. I would just write code to gather as much information as you can and start experimenting.
    gg
    If a Pc connect 12 monitors,after layout them for instance 4x3 if one monitor unplug HDMI cable, the layout become 1x11, then plug in again the HDMI cable, the layout recover back 4x3,do u know where are the layout info saved including monitors indentity and position ,resolutin?Is it a conf or in registry? But I compared the registry difference, not find the relevant infomation.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to setup visual c++ 6.0 to compile and run a C program?
    By BrandNewDeipz in forum C Programming
    Replies: 8
    Last Post: 06-20-2012, 02:58 PM
  2. question about program setup
    By vnet_hacker in forum C Programming
    Replies: 3
    Last Post: 03-01-2012, 07:16 PM
  3. start the program when GUI is setup on Linux
    By manav in forum Linux Programming
    Replies: 2
    Last Post: 03-26-2008, 04:02 AM
  4. Program that monitors what programs are on what ports!
    By mabufo in forum C++ Programming
    Replies: 2
    Last Post: 03-11-2006, 12:42 PM
  5. Socket Program includes and setup
    By Ianel in forum Networking/Device Communication
    Replies: 2
    Last Post: 09-23-2003, 05:23 PM