Article View: borland.public.cppbuilder.nativeapi
Article #12304Re: A filename by Handle
From: Remy Lebeau (TeamB)
Date: Tue, 16 Dec 2003 08:20
Date: Tue, 16 Dec 2003 08:20
17 lines
1569 bytes
1569 bytes
"Igor Tsukanov" <darl@mail.com> wrote in message
news:3fdeb189$1@newsgroups.borland.com...
> How can I get a name of executable file by defined window handle?
There is no direct way to do that. You will have to use
GetWindowThreadProcessId() to get the window's process ID, and then
enumerate the currently running processes on the machine until you find a
process with a matching ID, at which time you will then know the filename as
well. To enumerate the processes, have a look at the following article
HOWTO: Enumerate Applications Using Win32 APIs
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q175030
Gambit
Technical Details
Message-ID:
<3fdec0a3$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3fdeb189$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,61480269f5926318 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-12-16 00:39:35 PST From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3fdeb189$1@newsgroups.borland.com> Subject: Re: A filename by Handle Date: Tue, 16 Dec 2003 00:20:11 -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: <3fdec0a3$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1071562915 67.23.78.224 (16 Dec 2003 00:21:55 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail