Article View: borland.public.cppbuilder.nativeapi
Article #2669Re: Closing other applications
From: Remy Lebeau (TeamB)
Date: Mon, 29 Jan 2007 08:00
Date: Mon, 29 Jan 2007 08:00
17 lines
1395 bytes
1395 bytes
"Richard Kavanagh" <dd.foldhill@google-ignore-mail.com> wrote in message news:45bd00e3@newsgroups.borland.com... > I wish to nicely close a tree of other processes. I can get their PIDs > using CreateToolhelp32Snapshot() so I can use TerminateProcess() > on each one. This is a bit drastic as it can cause up to two hours work > to be lost. Is there another way? Use EnumWindows() and GetWindowThreadProcessId() to find all of the HWNs that belong to those processes. Then you can send WM_CLOSE and/or WM_QUIT messages to them. Gambit
Technical Details
Message-ID:
<45bdaa0c@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news1.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<45bd00e3@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,b6f91467ebf2f221 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: <45bd00e3@newsgroups.borland.com> Subject: Re: Closing other applications Date: Mon, 29 Jan 2007 00:00:31 -0800 Lines: 19 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: <45bdaa0c@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1170057740 75.83.34.171 (29 Jan 2007 00:02:20 -0800) Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news1.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail