Einzelnen Beitrag anzeigen

Rumpi

Registriert seit: 26. Aug 2003
Ort: Berlin
72 Beiträge
 
#1

Monitor X per ChangeDisplaySettingsEx (A) akivieren ?

  Alt 2. Feb 2005, 22:29
Hallo,

ich versuche einen 2. Monitor ( inaktiv ) per API zu aktiviern,
leider geht das nicht so wie gewollt.

Zitat:
When adding a display monitor to a multiple-monitor system programmatically, set DEVMODE.dmFields to DM_POSITION and specify a position (in DEVMODE.dmPosition) for the monitor you are adding that is adjacent to at least one pixel of the display area of an existing monitor. To detach the monitor, set DEVMODE.dmFields to DM_POSITION but set DEVMODE.dmPelsWidth and DEVMODE.dmPelsHeight to zero.
Ich hole mir mit:
EnumDisplaySettingsExA( PChar('\\.\Display'+IntToStr(Index)), ENUM_REGISTRY_SETTINGS, DevModeExA, 0); Die Daten, des Index nicht aktiven Monitors, aus der Registry.

Leider liefert:
ChangeDisplaySettingsExA(PChar('\\.\DISPLAY'+IntToStr(Index)), DevModeExA, 0, 0, nil); immer nur : DISP_CHANGE_FAILED !

Das Lesen aller Daten geht
************************************************** *****************************************
1. Wide viewing angle & High density FlexView Display 1600x1200 on ATI MOBILITY FIRE GL T2
primary,
1600 x 1200 @ 0,0 - 32-bit - 60 Hz
workspace: 0,0 - 1600,1136 HMONITOR: 0x10001
Device: \\.\DISPLAY1\Monitor3

2. (Standardmonitor) on ATI MOBILITY FIRE GL T2
disabled,
1024 x 768 @ 1600,0 - 32-bit - 60 Hz
Device: \\.\DISPLAY2\Monitor0

************************************************** ******************************************

Vielen Dank für euren Input.
Rumpi
  Mit Zitat antworten Zitat