🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: ChangeDisplaySettingsEx driving me nuts...

#7930
From: Remy Lebeau (TeamB)
Date: Thu, 16 Dec 2004 09:54
23 lines
1807 bytes
"Graham Thompson" <gct@faGUESS-WHAT-TO-DO-WITH-THISsl.co.uk> wrote in
message news:41c13f6a@newsgroups.borland.com...

> Here's the code:
<snip>
> and lResult is coming back as DISP_CHANGE_SUCCESSFUL.
> But, the monitor is still at the same position and certainly not
'detached'.

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;


Gambit
Technical Details
Message-ID: <41c15b29@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news2.euro.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <41c00d82@newsgroups.borland.com> <41c07e5c$1@newsgroups.borland.com> <41c13f6a@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: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <41c00d82@newsgroups.borland.com> <41c07e5c$1@newsgroups.borland.com> <41c13f6a@newsgroups.borland.com>
Subject: Re: ChangeDisplaySettingsEx driving me nuts...
Date: Thu, 16 Dec 2004 01:54:21 -0800
Lines: 25
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 68.69.17.41
Message-ID: <41c15b29@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1103190825 68.69.17.41 (16 Dec 2004 01:53:45 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news2.euro.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail