🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Using CHM files in BCB6

#3557
From: JF Jolin
Date: Sat, 27 May 2006 20:14
76 lines
3560 bytes
>> execinfo.lpFile = "hh.exe";                    // Executable in \WINDOWS\system32 for Html Help
> Actually I've got a \WINDOWS\hh.exe, rather than \WINDOWS\system32\hh.exe
>
> So you say to
> execinfo.lpFile = "hh.exe";
> but with
>> AnsiString HelpFile = "a.chm::/topic.htm";     // topic.htm is a topic inside a.chm
> I actually do
> execinfo.lpFile = "a.chm::/topic.htm";
> I don't understand what do you mean here.

When you go like this: execinfo.lpFile = "a.chm"
The executable is chosen by the mean of the extension of the file.
Which is also the very last portion of the string.

When you go like this: execinfo.lpFile = "hh.exe"
The executable is forced to be hh.exe
And it must be on the path (environment variable (Path) ).
Otherwise specify the full access:  execinfo.lpFile = "c:\\somewhere\\hh.exe"

From here we can control the exact parameter we want to pass to hh.exe
Which is: execinfo.lpParameters = "a.chm::/topic.htm"

> I tried
> execinfo.lpFile = "a.chm::/topic.htm";

windows is confused about what/how to launch

> where topic.htm exists in my a.chm, which I've compiled with HelpMaker and manually checked that topic.htm exists,
> but when I ShellExecuteEx with this execinfo I get
> "Windows cannot access the specified device, path, or file. You may not have the appropriate permissions to access the item"
> which isn't good.

I forgot to mention. a.chm and topic.htm must be
present in the directory: execinfo.lpDirectory
Even if topic.htm is already included in a.chm

If you want to use only a.chm
Here is how to do it.
a.chm must contain a valid map ID.

Look in Html Maker under Test-HtmlHelp-API
with HH_HELP_CONTEXT an 10000 (could be an other number)
When you have a successfull test there.

Make a test with a Dos prompt like
hh.exe -mapid 10000 a.chm

And finally replace: execinfo.lpParameters = "a.chm::/topic.htm"
with:                execinfo.lpParameters = "-mapid 10000 a.chm"


>> for more info
>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/htmlhelp/html/vsconhtlink6.asp
>
> I checked this out, but I couldn't find the mentioned 'execfile' macro there, neither compile it.
> Maybe I'm missing a header file?

The execfile macro is used with Office 2000 applications.
And have the same behavior as ShellExecute.

>> ::FindWindow(NULL, "My title help");           // returns not NULL if that help title is already open
> This works fine, thanks.

good

>> http://web.archive.org/web/20030626080800/www.bcbdev.com/faqs/faq74.htm
> I couldn't browse to this link, "Error 400 Bad request".
>

Sometime I can access it. Sometime I cannot.

Good day

-- 
JF Jolin
Technical Details
Message-ID: <ops977uxq3z6rw7b@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <4476c656$1@newsgroups.borland.com> <ops96etynxz6rw7b@newsgroups.borland.com> <44783661$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,27bcb2a52828a1c4
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Using CHM files in BCB6
References: <4476c656$1@newsgroups.borland.com> <ops96etynxz6rw7b@newsgroups.borland.com> <44783661$1@newsgroups.borland.com>
Message-ID: <ops977uxq3z6rw7b@newsgroups.borland.com>
Content-Type: text/plain; charset=iso-8859-15; format=flowed
From: JF Jolin <jfj@nospam.com>
MIME-Version: 1.0
Date: Sat, 27 May 2006 16:14:47 -0400
User-Agent: Opera7.11/Win32 M2 build 2887
NNTP-Posting-Host: 66.36.140.115
X-Trace: newsgroups.borland.com 1148760949 66.36.140.115 (27 May 2006 13:15:49 -0700)
Lines: 76
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail