Article View: borland.public.cppbuilder.nativeapi
Article #2377Re: HELP: My app closes, but cancels Windows shutdown?
From: Remy Lebeau (TeamB)
Date: Thu, 08 Mar 2007 21:56
Date: Thu, 08 Mar 2007 21:56
20 lines
1582 bytes
1582 bytes
"A Nonymous" <anonymous@hotmail.com> wrote in message
news:Xns98ED941B2E2C8anonymoushotmailcom@207.105.83.66...
> My original code which has not changed in a LONG time and used to
work
> fine:
Why don't you simply use the form's OnCloseQuery and OnClose events
instead? The VCL already handles the WM_QUERYENDSESSION and
WM_ENDSESSION messages. OnCloseQuery is triggered when
WM_QUERYENDSESSION is received.
> HWND H = FindWindow("TFormMain",NULL);
Have you tried sending the message to the hidden TApplication window
yet? That is the parent window for TForm, after all.
Gambit
Technical Details
Message-ID:
<45f08683$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<Xns98ED90968E734anonymoushotmailcom@207.105.83.66> <Xns98ED941B2E2C8anonymoushotmailcom@207.105.83.66>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,346f60f70c29a156 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <Xns98ED90968E734anonymoushotmailcom@207.105.83.66> <Xns98ED941B2E2C8anonymoushotmailcom@207.105.83.66> Subject: Re: HELP: My app closes, but cancels Windows shutdown? Date: Thu, 8 Mar 2007 13:56:11 -0800 Lines: 22 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 75.83.34.171 Message-ID: <45f08683$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1173390979 75.83.34.171 (8 Mar 2007 13:56:19 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail