🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #7832

Re: ChangeDisplaySettingsEx driving me nuts...

#7832
From: Graham Thompson
Date: Thu, 16 Dec 2004 10:19
27 lines
2013 bytes
"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message
news:41c15b29@newsgroups.borland.com...
>
> "Graham Thompson" <gct@faGUESS-WHAT-TO-DO-WITH-THISsl.co.uk> wrote in
> message news:41c13f6a@newsgroups.borland.com...
>
> You did not set the DEVMODE's dmPosition member.  Since you left the
> dmPosition at its original value, you are not actually changing the
> monitor's settings at all.  The dmFields member also needs the
DM_PELSWIDTH
> and DM_PELSHEIGHT flags in order to use the dmPelsWidth/Height members.
>
>     dm.dmFields = DM_POSITION | DM_PELSWIDTH | DM_PELSHEIGHT;
>     dm.dmPosition.x = 0;
>     dm.dmPosition.y = 0;
>     dm.dmPelsWidth = 0;
>     dm.dmPelsHeight = 0;

As usual, you got it Remy. My fault for taking the MSDN literally!

And just in case anyone else is watching this for the answer, note that the
ChangeDisplaySettingsEx call also needs'CDS_GLOBAL | CDS_UPDATEREGISTRY as
its dwFlags parameter for the change to be permanent instead of 'fleeting'.

Thanks once again,

GT.
Technical Details
Message-ID: <41c1613a@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <41c00d82@newsgroups.borland.com> <41c07e5c$1@newsgroups.borland.com> <41c13f6a@newsgroups.borland.com> <41c15b29@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,4bfd89b1b8a413a2
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Graham Thompson" <gct@faGUESS-WHAT-TO-DO-WITH-THISsl.co.uk>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <41c00d82@newsgroups.borland.com> <41c07e5c$1@newsgroups.borland.com> <41c13f6a@newsgroups.borland.com> <41c15b29@newsgroups.borland.com>
Subject: Re: ChangeDisplaySettingsEx driving me nuts...
Date: Thu, 16 Dec 2004 10:19:37 -0000
Lines: 29
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: 62.173.124.106
Message-ID: <41c1613a@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1103192378 62.173.124.106 (16 Dec 2004 02:19:38 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail