🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Which API can detect the PC going sleep?

#85
From: Remy Lebeau (TeamB)
Date: Sat, 21 Jun 2008 00:18
12 lines
1216 bytes
"James5950" <James@1come.com.tw> wrote in message 
news:485c4381@newsgroups.borland.com...

> My application need close before PC into sleep mode.
> How can I do now?

Intercept the WM_POWERBROADCAST message and look for the PBT_APMSUSPEND 
notification.


Gambit 
Technical Details
Message-ID: <485c496b$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!feeder.erje.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <485c4381@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,8971e4a327b29d5e
X-Google-Attributes: gid10cc67,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <485c4381@newsgroups.borland.com>
Subject: Re: Which API can detect the PC going sleep?
Date: Fri, 20 Jun 2008 17:18:49 -0700
Lines: 14
Organization: Lebeau Software
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 207.178.157.90
Message-ID: <485c496b$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1214007659 207.178.157.90 (20 Jun 2008 17:20:59 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!feeder.erje.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail