From: Ben Kinslow on
Hi

I am trying to set an "unsupported" screen resolution in Windows using the
ChangeDisplaySettingsEx API call. I get a DISP_CHANGE_BADMODE error. If I
uncheck the "Hide modes that this monitor cannot display" for the monitor
settings the call works and the resolution is displayed correctly. is there
any way to force the "unsupported" display mode, or programatically uncheck
the "Hide modes...." checkbox.

Any help will be greatly appreciated.

Regards
Ben


From: Christian ASTOR on
On 17 déc, 16:43, "Ben Kinslow"
<ben.kins...(a)antispamremovethis.baesystems.com> wrote:

> I am trying to set an "unsupported" screen resolution in Windows using the
> ChangeDisplaySettingsEx API call.  I get a DISP_CHANGE_BADMODE error.  If I
> uncheck the "Hide modes that this monitor cannot display" for the monitor
> settings the call works and the resolution is displayed correctly.  is there
> any way to force the "unsupported" display mode, or programatically uncheck
> the "Hide modes...." checkbox.

It's the "PruningMode" value of key returned by EnumDisplayDevices()
(on Vista, might work with ChangeDisplaySettingsEx() & 0x100 or 0x200,
not sure...)
From: Ben Kinslow on
Thanks for the assistance!

The device does in deed report DISPLAY_DEVICE_MODESPRUNED, but does knowing
that allow me to force a pruned mode?

I tried ChangeDisplaySettingsEx() with 0x100 and 0x200 flags set in dmFields
of the DEVMODE parameter, but no luck - is that what you were suggesting? I
am running XPE!

"Christian ASTOR" <castorix(a)club-internet.fr> wrote in message
news:e242ce17-b21e-48dc-9077-ebc9dc93016a(a)z6g2000pre.googlegroups.com...
On 17 d�c, 16:43, "Ben Kinslow"
<ben.kins...(a)antispamremovethis.baesystems.com> wrote:

> I am trying to set an "unsupported" screen resolution in Windows using the
> ChangeDisplaySettingsEx API call. I get a DISP_CHANGE_BADMODE error. If I
> uncheck the "Hide modes that this monitor cannot display" for the monitor
> settings the call works and the resolution is displayed correctly. is
> there
> any way to force the "unsupported" display mode, or programatically
> uncheck
> the "Hide modes...." checkbox.

It's the "PruningMode" value of key returned by EnumDisplayDevices()
(on Vista, might work with ChangeDisplaySettingsEx() & 0x100 or 0x200,
not sure...)


From: Christian ASTOR on
On 18 déc, 10:40, "Ben Kinslow"
<ben.kins...(a)antispamremovethis.baesystems.com> wrote:
> Thanks for the assistance!
>
> The device does in deed report DISPLAY_DEVICE_MODESPRUNED, but does knowing
> that allow me to force a pruned mode?
>
> I tried ChangeDisplaySettingsEx() with 0x100 and 0x200 flags set in dmFields
> of the DEVMODE parameter, but no luck - is that what you were suggesting?  I
> am running XPE!


No.
Set the value of "PruningMode" to 0 with RegSetValueEx()
Then call ChangeDisplaySettings() 2 times
(CDS_TEST then CDS_UPDATEREGISTRY | CDS_NORESET)
then a last time with ChangeDisplaySettings(NULL, 64)