Article View: borland.public.cppbuilder.nativeapi
Article #1771Re: How Can I get the Program path of a given hWnd
From: Bob Gonder
Date: Sat, 16 Jun 2007 16:21
Date: Sat, 16 Jun 2007 16:21
15 lines
1483 bytes
1483 bytes
Emmanuel wrote: >If I got a hWnd of an application, How can I know the program file name,and >where the path of the program, See the help section: Retrieving a Window Property http://msdn2.microsoft.com/en-us/library/Aa929345.aspx hMemProp = (HGLOBAL) GetProp(hwndSubclass, "PROP_BUFFER"); lpFilename = GlobalLock(hMemProp); nSize = sprintf(tchBuffer, "Path to file: %s", lpFilename); I haven't found where the magic strings are listed, but you can enum them with EnumPropsEx http://msdn2.microsoft.com/en-us/library/aa920752.aspx
Technical Details
Message-ID:
<om1873pd7b693i0j90qr3jpi38komt1j4u@4ax.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!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: Bob Gonder <notbg@notmindspring.invalid> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: How Can I get the Program path of a given hWnd Date: Sat, 16 Jun 2007 09:21:55 -0700 Organization: MindSpring Enterprises, Inc. Reply-To: notbg@notmindspring.invalid Message-ID: <om1873pd7b693i0j90qr3jpi38komt1j4u@4ax.com> References: <4673ca37$1@newsgroups.borland.com> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 69.69.88.79 X-Trace: newsgroups.borland.com 1182010914 69.69.88.79 (16 Jun 2007 09:21:54 -0700) Lines: 17 Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail