🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: TTrayIcon and Shutdown (one step later)

#1056
From: Marc
Date: Sat, 17 Nov 2007 10:02
34 lines
2295 bytes
Hi Remy

Yes this must be the case... I tried to have just an empty form and the 
TTrayIcon control on it. Here I was able to catch the WM_ENDSESSION message 
but only when the Form was visible. When the form is minimized the TTrayIcon 
calls ShowWindow(Application->Handle, SW_HIDE) and then does not receive any 
messages anymore (at least this is what I think).
Anyway I got rid of all the external components (TTrayIcon and 
TShutDownWatcher) and handle the Shell_NotifyIcon calls myself. Since then I 
also get the WM_ENDSESSION messages and it works...

Rds
Marc




"Remy Lebeau (TeamB)" <no.spam@no.spam.com> schrieb im Newsbeitrag 
news:473dda9b$1@newsgroups.borland.com...
>
> "Marc" <info@mawnet.com> wrote in message 
> news:473d39cd$1@newsgroups.borland.com...
>
>> The problem is that somehow the sequence is interrupted
>> and Windows does not complete it.
>
> That happens when an application tells the OS to abort the shutdown in 
> reply to the shutdown messages.  So either 1) you are not replying to them 
> correctly, or 2) another application outside of your control is doing so 
> after your app has already been terminated.
>
>
> Gambit
> 
Technical Details
Message-ID: <473ebc68$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!newsgate.cistron.nl!xs4all!feeder.news-service.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <473cd9cf$1@newsgroups.borland.com> <473cdc5d@newsgroups.borland.com> <473d39cd$1@newsgroups.borland.com> <473dda9b$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,a42b7d249fb2d6b7
X-Google-Attributes: gid10cc67,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Reply-To: "Marc" <info@mawnet.com>
From: "Marc" <info@mawnet.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <473cd9cf$1@newsgroups.borland.com> <473cdc5d@newsgroups.borland.com> <473d39cd$1@newsgroups.borland.com> <473dda9b$1@newsgroups.borland.com>
Subject: Re: TTrayIcon and Shutdown (one step later)
Date: Sat, 17 Nov 2007 11:02:20 +0100
Lines: 36
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: 83.77.49.247
Message-ID: <473ebc68$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1195293800 83.77.49.247 (17 Nov 2007 02:03:20 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!newsgate.cistron.nl!xs4all!feeder.news-service.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail