Article View: borland.public.cppbuilder.nativeapi
Article #1773Re: How Can I get the Program path of a given hWnd
From: Remy Lebeau (TeamB)
Date: Sat, 16 Jun 2007 15:29
Date: Sat, 16 Jun 2007 15:29
16 lines
1546 bytes
1546 bytes
"Emmanuel" <emmanuel@erphk.com> wrote in message news:4673ca37$1@newsgroups.borland.com... > If I got a hWnd of an application, How can I know the > program file name, and where the path of the program, An HWND does not store that information. You cannot retreive the filename directly from an HWND alone. What you will have to do instead is use GetWindowThreadProcessId() to get the process ID of the HWND, and then loop through all of the running processes on the machine until you find a matching ID. Then you will know the filename. Gambit
Technical Details
Message-ID:
<467417a2$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!club-internet.fr!feedme-small.clubint.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<4673ca37$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,e6c0aadd4c174c13 X-Google-Attributes: gid10cc67,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <4673ca37$1@newsgroups.borland.com> Subject: Re: How Can I get the Program path of a given hWnd Date: Sat, 16 Jun 2007 08:29:33 -0700 Lines: 18 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.82.252.126 Message-ID: <467417a2$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1182013346 75.82.252.126 (16 Jun 2007 10:02:26 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!club-internet.fr!feedme-small.clubint.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail