🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Find main window

#12431
From: Remy Lebeau (TeamB)
Date: Thu, 04 Dec 2003 01:27
16 lines
1496 bytes
"nicolasr" <nicolasrNOSPAMATSIGNgmx.net> wrote in message
news:3fce7f27$1@newsgroups.borland.com...

> I want to close several programs from my app.
> Given the process IDs I could filter out which
> windows belong to a given program. But I would
> like to only send WM_CLOSE to the main window.

Finding the "main" window can be tricky.  Some programs don't have a concept
of a "main" window, they can have multiple top-level windows.  You would be
better off just sending WM_CLOSE to every window that matches the process
ID(s) and let the respective programs deal with the closures accordingly.


Gambit
Technical Details
Message-ID: <3fce8c75$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3fce7f27$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,74436598b6953f9a
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-12-03 17:39:25 PST
From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3fce7f27$1@newsgroups.borland.com>
Subject: Re: Find main window
Date: Wed, 3 Dec 2003 17:27:28 -0800
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: 67.23.78.224
Message-ID: <3fce8c75$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1070500981 67.23.78.224 (3 Dec 2003 17:23:01 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail