🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: WM_ENDSESSION + Win2k/WinXP

#15592
From: Frank Gruber
Date: Sat, 21 Jun 2003 08:34
29 lines
2570 bytes
> >different. I'm still searching for a reliable solution to properly
terminate
> >an application on system shutdown which also does not completely
> >break OOP design.
>
> Why is that important?
> I would think if you are sitting in the sytem tray, that you wouldn't
> have anything "open" that couldn't sustain a power outage.

The reason is because I'm looking for a solution which reliably
works and don't need to be verified again in every new project.
Even if the app sits in the system tray every destructor should be
called. Some because they store persistent information before
the class is destroyed, some to properly inform cooperating
processes on the network that they finish work. Again it is
possible to make modification so that it works in a specific case,
but the cleanest solution would be if you could simply trust
OOP that every desctructor is called.

> You already stated that if the app is visable, that the shutdown
> works. So I think you just need to be more careful about what you are
> doing as a system-tray app.

The only difference is that the TApplication window is one time
hidden and TMainForm window is minimized and the other time
the one is visible and the other restored.

Regards,
Frank.
Technical Details
Message-ID: <3ef418b4$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!newsfeed.news2me.com!arclight.uoregon.edu!logbridge.uoregon.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <3ef08c31$1@newsgroups.borland.com> <3ef09b02$1@newsgroups.borland.com> <3ef0a332@newsgroups.borland.com> <3ef0c5ce@newsgroups.borland.com> <3ef1a66e@newsgroups.borland.com> <3ef222f7@newsgroups.borland.com> <3ef23002$1@newsgroups.borland.com> <3ef23057@newsgroups.borland.com> <3ef33027@newsgroups.borland.com> <8fh6fvoi82kimc9oorhue9opkv67ubjo3i@4ax.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,9e00bf1ef85252e4
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-06-21 01:37:35 PST
From: "Frank Gruber" <HVFDMIPUMFPS@spammotel.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3ef08c31$1@newsgroups.borland.com> <3ef09b02$1@newsgroups.borland.com> <3ef0a332@newsgroups.borland.com> <3ef0c5ce@newsgroups.borland.com> <3ef1a66e@newsgroups.borland.com> <3ef222f7@newsgroups.borland.com> <3ef23002$1@newsgroups.borland.com> <3ef23057@newsgroups.borland.com> <3ef33027@newsgroups.borland.com> <8fh6fvoi82kimc9oorhue9opkv67ubjo3i@4ax.com>
Subject: Re: WM_ENDSESSION + Win2k/WinXP
Date: Sat, 21 Jun 2003 10:34:19 +0200
Lines: 32
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4922.1500
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4925.2800
NNTP-Posting-Host: 217.231.178.108
Message-ID: <3ef418b4$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1056184500 217.231.178.108 (21 Jun 2003 01:35:00 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!newsfeed.news2me.com!arclight.uoregon.edu!logbridge.uoregon.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail