🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Screen Saver

#3258
From: M J Heneghan
Date: Thu, 10 Aug 2006 14:47
34 lines
2179 bytes
Thanks for the information.  I have a lot to learn!


"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message 
news:44dae467$1@newsgroups.borland.com...
>
> "M J Heneghan" <mjheneghan@ntlworld.com> wrote in message
> news:44dacfb0$1@newsgroups.borland.com...
>
>>  bool *IsScreenSave;
>>  SystemParametersInfo(SPI_GETSCREENSAVEACTIVE, 0, IsScreenSave, 0);
>
> That is not the correct way to pass the boolean.  You have to use the '&'
> operator instead:
>
>    BOOL IsScreenSave;
>    SystemParametersInfo(SPI_GETSCREENSAVEACTIVE, 0, &IsScreenSave, 0);
>
>> however, the screensaver still kicks in.
>
> As it should be.  You are not preventing it from running at all.
> SPI_SETSCREENSAVEACTIVE does not deactive the screensaver if it is already
> running.  It is only a flag to tell the OS whether the screensaver is
> running or not.  Screensavers use SPI_SETSCREENSAVEACTIVE when they run. 
> If
> anything, you should be setting SPI_SETSCREENSAVEACTIVE to TRUE instead of
> FALSE to trick the OS into thinking a screensaver is running when none
> actually is.  That way, the actual screen saver will not kick in until you
> set SPI_SETSCREENSAVEACTIVE back to FALSE later.
>
>
> Gambit
>
> 
Technical Details
Message-ID: <44db46fd@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <44dacfb0$1@newsgroups.borland.com> <44dae467$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,daf9a6c110c41bce
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "M J Heneghan" <mjheneghan@ntlworld.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <44dacfb0$1@newsgroups.borland.com> <44dae467$1@newsgroups.borland.com>
Subject: Re: Screen Saver
Date: Thu, 10 Aug 2006 15:47:19 +0100
Lines: 36
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 86.3.95.23
Message-ID: <44db46fd@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1155221245 86.3.95.23 (10 Aug 2006 07:47:25 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail