🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Which message is posted when we close an application from task manager?

#13972
From: Sub-zero
Date: Mon, 01 Sep 2003 09:02
17 lines
1686 bytes
Hello,

My application has ICS server components which needs the message queue and
time/cycles to close up. So I use non-standard closing procedures. I disable
closing by setting CanClose=false; in OnCloseQuery and posting WM_Destroy
message which is handled in Wnd_Proc and a WM_QUIT is posted there.

This works well when I close the program from File Menu->Shut Down. However
when I try to close the program from Task Manager -> Applications -> Close,
Windows waits a few secs and then launches "End Task" question! I want it to
close gracefully. I checked and saw that neither WM_DESTROY nor WM_QUIT is
posted when I try to close from Task Manager->Applications (not processes!
It works). Does anyone know how to do it gracefully?

Best Regards,

SZ
Technical Details
Message-ID: <3f530b42@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,e1f1c761d4d765ee,start
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-09-01 02:07:07 PST
From: "Sub-zero" <g_ates@hotmail.com>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Which message is posted when we close an application from task manager?
Date: Mon, 1 Sep 2003 12:02:54 +0300
Lines: 19
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 212.174.57.39
Message-ID: <3f530b42@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1062406978 212.174.57.39 (1 Sep 2003 02:02:58 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail