🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #9227

Re: URL Offsets Prevent URLs from being passed to a browser

#9227
From: Bob Gonder
Date: Mon, 26 Jul 2004 21:38
21 lines
1616 bytes
Randall Parker wrote:

>I suspect the #Hotkeys or the %23HotKeys is preventing the file from being recognized 
>as appropriate for a browser.

That's right.

> 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: <2mtag0ha1q4e2uj39svnoruuib3k80s5cu@4ax.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <41048d77$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,80cfdee9a8d50af3
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Bob Gonder <notbg@notmindspring.invalid>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: URL Offsets Prevent URLs from being passed to a browser
Date: Mon, 26 Jul 2004 14:38:38 -0700
Organization: MindSpring Enterprises, Inc.
Reply-To: notbg@notmindspring.invalid
Message-ID: <2mtag0ha1q4e2uj39svnoruuib3k80s5cu@4ax.com>
References: <41048d77$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.245.150
X-Trace: newsgroups.borland.com 1090877915 69.69.245.150 (26 Jul 2004 14:38:35 -0700)
Lines: 23
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail