Article View: borland.public.cppbuilder.nativeapi
Article #10936Re: Finding a Spawned Window
From: Bob Gonder
Date: Fri, 05 Mar 2004 23:26
Date: Fri, 05 Mar 2004 23:26
29 lines
2244 bytes
2244 bytes
Mortz wrote: >Does the CreateProcess open a folder when a folder path is given instead of >a path + filename? No. Maybe FindExecutable() would return Explorer in that case? Otherwise you could use GetOpenFileName() for that? >> If you are using ShellExecuteEx because you don't know the name of the >> executable for the file, you can use >> FindExecutable() to get the proper exe to use in CreateProcess. > >How can I show the "Open with" window when there's no associated program to >the filename extension? Well, if you don't want to use ShellExecuteEx, then maybe ShowMessage( "I don't know how to process that file." ); Otherwise, I suppose you could try to hack into ShellExecuteEx because it's supposed to use CreateProcess internally, so there must be a mechanism for OpenWith inside there that you might be able to tap into. Not saying it's a good idea. Depends on how badly you want to avoid ShellExecute. I don't recall seeing why it is you want to go through all this pain. You want to know the Window spawned by executing something the user clicks on, but "How does the user Select something"? And Why aren't you limiting those selections to something you can handle?
Technical Details
Message-ID:
<qa0i40ph2okusrb9cbtottvqf4vdtvid5s@4ax.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-mailReferences:
<4048c64f$1@newsgroups.borland.com> <4048d25f@newsgroups.borland.com> <4048f2c1$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,6b6fbcbb8d2db5cb X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2004-03-05 15:40:06 PST From: Bob Gonder <notbg@notmindspring.invalid> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Finding a Spawned Window Date: Fri, 05 Mar 2004 15:26:40 -0800 Organization: MindSpring Enterprises, Inc. Reply-To: notbg@notmindspring.invalid Message-ID: <qa0i40ph2okusrb9cbtottvqf4vdtvid5s@4ax.com> References: <4048c64f$1@newsgroups.borland.com> <4048d25f@newsgroups.borland.com> <4048f2c1$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: 67.31.165.118 X-Trace: newsgroups.borland.com 1078529208 67.31.165.118 (5 Mar 2004 15:26:48 -0800) Lines: 32 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