Article View: borland.public.cppbuilder.nativeapi
Article #4895Re: Windows shutdown not closing my app
From: Vladimir Stefanovic
Date: Thu, 10 Nov 2005 15:18
Date: Thu, 10 Nov 2005 15:18
28 lines
1520 bytes
1520 bytes
> tried having this WndProc() trap the
> WM_QUERYENDSESSION [...]
Not only the WM_QUERYENDSESSION !
This is the code that works fine for me:
void __fastcall TDiMainForm::WndProc( TMessage &Message )
{
switch ( Message.Msg )
{
// ... other messages ...
case WM_QUERYENDSESSION:
case WM_ENDSESSION:
YourCleanUpCodeHere();
break;
// ... other messages ...
}
TForm::WndProc( Msg );
}
--
Best regards,
Vladimir Stefanovic
Technical Details
Message-ID:
<437364bd@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<437354f8@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,6f884ae678fc34b6 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Vladimir Stefanovic" <antivari@po.sbb.co.yu> Newsgroups: borland.public.cppbuilder.nativeapi References: <437354f8@newsgroups.borland.com> Subject: Re: Windows shutdown not closing my app Date: Thu, 10 Nov 2005 16:18:48 +0100 Lines: 30 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 82.117.212.65 Message-ID: <437364bd@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1131635901 82.117.212.65 (10 Nov 2005 07:18:21 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail