Article View: borland.public.cppbuilder.nativeapi
Article #5803Re: Detecting windows shudtown.
From: Bob Gonder
Date: Sun, 03 Jul 2005 18:55
Date: Sun, 03 Jul 2005 18:55
27 lines
1816 bytes
1816 bytes
qyte wrote:
Gambit knows the VCL best, but I'll just add a bit of confusion....
In my own non-VCL app, returning TRUE stops the shutdown.
Only when I return FALSE does the shutdown proceed.
This seems to go against the manual, both win32.hlp and MSDN.
>for example (i have tried both).
>void __fastcall TForm1::WndProc(TMessage &Message)
>{
> if(Message.Msg==WM_QUERYENDSESSION)
> {
> Application->Terminate();
> Message.Result=true;
Try using
Message.Result=false;
>void __fastcall TForm1::AppOnMessage(TMsg &Msg, bool &Handled)
>{
> if(Msg.Message==WM_QUERYENDSESSION)
> {
> Application->Terminate();
> Handled=true;
Try using
Handled=false;
Technical Details
Message-ID:
<ftcgc1pslk0s0ekcn8cpl84sr3igv7bum6@4ax.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<42c4f6c9$1@newsgroups.borland.com> <42c50d9b$2@newsgroups.borland.com> <42c5edce$1@newsgroups.borland.com> <42c77b3f$1@newsgroups.borland.com> <42c7c82b@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,6f249ce41ad1dc44 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: Bob Gonder <notbg@notmindspring.invalid> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Detecting windows shudtown. Date: Sun, 03 Jul 2005 11:55:57 -0700 Organization: MindSpring Enterprises, Inc. Reply-To: notbg@notmindspring.invalid Message-ID: <ftcgc1pslk0s0ekcn8cpl84sr3igv7bum6@4ax.com> References: <42c4f6c9$1@newsgroups.borland.com> <42c50d9b$2@newsgroups.borland.com> <42c5edce$1@newsgroups.borland.com> <42c77b3f$1@newsgroups.borland.com> <42c7c82b@newsgroups.borland.com> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 67.77.202.147 X-Trace: newsgroups.borland.com 1120416963 67.77.202.147 (3 Jul 2005 11:56:03 -0700) Lines: 30 Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail