Article View: borland.public.cppbuilder.nativeapi
Article #9136Re: URL Offsets Prevent URLs from being passed to a browser
From: Randall Parker
Date: Tue, 27 Jul 2004 21:31
Date: Tue, 27 Jul 2004 21:31
31 lines
1997 bytes
1997 bytes
Bob,
I did as follows and it doesn't work. It opens the browser to the URL without the
#HotKeys added to the end of the URL.
AnsiString UrlStr = "file://" + ExtractFilePath(Application->ExeName) +
"Help/1_Introduction.htm";
AnsiString Param = UrlStr+"#HotKeys";
ShellExecute(NULL,"open",UrlStr.c_str(),Param.c_str(),0,SW_SHOWDEFAULT);
Any other ideas?
Bob Gonder wrote:
>>How to route the shell execution call to the browser?
>
>
> Have you tried using the parameters value?
> AnsiString UrlStr=
> "file://"+ExtractFilePath(Application->ExeName)+"myfile.htm";
> AnsiString Param = UrlStr+"#HotKeys";
>
> ShellExecute(NULL,"open",UrlStr.c_str(),Param.c_str(),0,SW_SHOWDEFAULT);
>
> Don't forget to put extra quotes around the path to account for spaces
> and other nasties that are allowed in paths, but look a lot like
> zwhitespace.
>
> Param = "\""+Param+"\"";
>
>
Technical Details
Message-ID:
<4106c9b5$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<41048d77$1@newsgroups.borland.com> <2mtag0ha1q4e2uj39svnoruuib3k80s5cu@4ax.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,80cfdee9a8d50af3 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Tue, 27 Jul 2004 14:31:50 -0700 From: Randall Parker <STOPtechiepundit@EVILfuturePOXpunditSPAM.com> User-Agent: Mozilla Thunderbird 0.7 (Windows/20040616) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: URL Offsets Prevent URLs from being passed to a browser References: <41048d77$1@newsgroups.borland.com> <2mtag0ha1q4e2uj39svnoruuib3k80s5cu@4ax.com> In-Reply-To: <2mtag0ha1q4e2uj39svnoruuib3k80s5cu@4ax.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 4.40.49.194 Message-ID: <4106c9b5$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1090963893 4.40.49.194 (27 Jul 2004 14:31:33 -0700) Lines: 31 Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail