Article View: borland.public.cppbuilder.nativeapi
Article #7912ChangeDisplaySettingsEx driving me nuts...
From: Graham Thompson
Date: Wed, 15 Dec 2004 10:10
Date: Wed, 15 Dec 2004 10:10
18 lines
1757 bytes
1757 bytes
Hi fellow troopers... I'm developing in Windows XP using BCB5, and I'm trying to disable the secondary monitor in a two-monitor setup. Trawling through the MSDN it looks like ChangeDisplaySettingsEx is a good place to start ... I've enumerated my DisplayDevices like a good boy, but when I go to call ChangeDisplaySettingsEx I get an access violation. Is ChangeDisplaySettingsEx part of GDI+? If os, should I be initialising GDI+ with GdiplusStartup() before calling ChangeDisplaySettingsEx? Many thanks in advance for any advice, GT. BTW (or should that be WTF): if I declare a spare DEVMODE struct in the function that calls ChangeDisplaySettingsEx, I don't get an access violation; the function succeeds but sets 'inappropriate' values.
Technical Details
Message-ID:
<41c00d82@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!border2.nntp.ams.giganews.com!border1.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-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,4bfd89b1b8a413a2,start 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 Subject: ChangeDisplaySettingsEx driving me nuts... Date: Wed, 15 Dec 2004 10:10:10 -0000 Lines: 20 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: <41c00d82@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1103105410 62.173.124.106 (15 Dec 2004 02:10:10 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!border2.nntp.ams.giganews.com!border1.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