You are not logged in. You can browse in the PowerBASIC Community, but you must click Login (top right) before you can post. If this is your first visit, check out the FAQ or Sign Up.
Bern, I'm not sure what you're asking, but .HLP files are created (usually) with Word as RTF files and compiled to the native format.
Your program uses the WinHelp API call to execute the help file in question.
Check MS's Website (MSDN) for details on the help compiler.
HelpBreeze and RoboHelp are two reasonably functional commercial products.
It's possible to design help files using any application that can generate
RTF output or, I think, even with a plain text editor -- seems to me that
I ran across instructions for doing that once. However, it's much easier
to use a tool designed specifically for the job.
Microsoft seems to have abandoned .HLP files in favor of various other
options.
If I were to design a help file from scratch, these days, I'd probably
just use HTML. It's simple, it's portable, you can put it on the Web
(of course), there are lots of tools for working with it, and it won't be
going obsolete any time soon.
I use HelpScribble, available at http://www.jgsoft.com
It's not free - its about US$79 now (it was a lot cheaper when I originally purchased it), but it does a superb job - everything I could ever ask for from a help file creator and nothing more. Microsoft have always been very secretive over the format of .HLP files and as a result I don't think there is a single helpfile compiler available that doesn't use the Microsoft help compilers - something to be aware of
In regards to creating help files in HTML format, I believe this is exactly what the .CHM format is for (which allows you to have everything in the one file), and HelpScribble can also create help files of this format. Also be aware of the two main .HLP formats - one of them is for Windows 3.x, and the second was introduced with Windows 95, which features Find and Contents amonmgst other options.
And how do you link a .hlp file to your PB app? ... buggered if I know
Best of luck,
Wayne
[This message has been edited by Wayne Diamond (edited March 02, 2001).]
Bern, I downloaded several free and shareware help authoring
tools some months ago. I never could get any of them to do
what I wanted BUT. Together with the wotsit text on rtf files
and examples that the authoring tools gave, I was able to
build my own RTF file (rich-text-format) and my cnt file
and made a help project file and then with the use of Help
Studio got it looking real good.
It just took some time looking at the examples, mostly, then
applying the examples to my situation.
"And how do you link a .hlp file to your PB app? ... buggered if I know "
Maybe this will help. This is how it is done in Visual Basic.
Perhaps it will give you an idea of how to do in in a PB app.
Without Code
Integrating help into VB is extremely easy. If you load your
Project Options, "Tools | Options" and select the "Project" tab,
you can specify the help file associated with your project.
Then all you need do is to assign each control or major
controls HelpContextID to the associated .HLP HelpID.
For example if you have a .HLP project with a topic called
"Navigating the main screen" with a HelpID of 1000. Then you
would assign 1000 to the forms HelpContextID. Run your project
and press F1 on the form and your help will appear.
Help Through Code
This is a guide for creating a VB6 Project and integrating
a simple help file.
1. Create your Help File and copy your compiled help file to
your VB Project directory.
2. Adding Simple Help to your VB Project
Create a new VB Project and add a text box, a button and a
CommonDialog control to your main form and name it
dlgCommonDialog. Double-click your form and in your
Form_Load event add the following:-
Private Sub Form_Load()
'Specify the name of your help file here or in Project Options'
App.HelpFile = App.Path & "\vbtest.HLP"
dlgCommonDialog.HelpFile = App.HelpFile
End Sub
Run your project and press F1. You will see your help file
displayed. That's the basics.
3. Adding Context Sensitive Help
Back into design mode, select your text box and set its
HelpContextID property to 1000, i.e. the HelpID of the
first topic in the .HLP, which we called "Main Form".
Run your project and press F1 when in the text box. You'll
now see the Main Form topic appear. Tab to the button and
press F1 - you see the contents, because it does not have
a specific helpID assigned to it. That's one kind of context
sensitive help. The other is What's this style help.
Set the WhatsThisHelpID for your command button to 2000.
Now select your form and set the MaxButton and MinButton to
False, then set the WhatsThisHelp and the WhatsThisHelpButton
properties to True.
Run your project and you will see a ? icon in your toolbar.
Click on it and then drop your mouse on the button. Your
context sensitive topic will be displayed.
4. Adding Help to your Menus
Add a menu with a Help option that has two options, "Contents"
and "Search". I've called the menus mnuHelpContents and
mnuHelpSearch and added the following code:-
Private Sub mnuHelpContents_Click()
Const HelpFinder = &HB 'this tells winhelp to display the CNT file
dlgCommonDialog.HelpCommand = HelpFinder
dlgCommonDialog.ShowHelp
End Sub
Private Sub mnuHelpSearch_Click()
dlgCommonDialog.HelpCommand = cdlHelpPartialKey
dlgCommonDialog.ShowHelp
End Sub
I still use a 1992 version of WORD to build the RTF for help files
because I bothered to learn the macros of its rather toothless
WordBasic a long time ago.
I got the basic technical data for help files from the old SDK
for windows 3.11. The current HCW help compiler is free from
Microsoft and works well if you bother to use a few tricks like
using the SDK SHED.EXE that converts bitmaps to segmented
hypergraphics. It makes them a LOT smaller and you can set up
links from the image or different parts of it.
I still prefer the Winhelp format help files because they are a
lot smaller than the newer CHM format versions but if size is not
a problem for you, you can get the new type of help compiler from
Microsoft and compose your help files in HTML.
Just be warned that the size will scare you and they are not as
fast to use as the older Winhelp type.
Bern, I use
shell "winhlp32 -I chaptertogoto nameofhelpfile.hlp"
without the -I (and chaptertogoto) it goes to the main page
with Content Index Find tabs.
of course the chaptertogoto is a defined part of the contents.
HTML help stinks, IMHO. Not fun to have to load up a multi-megabyte
package just to see some quick help for a function. Absolute downside
is the fact that millions of people still are running Win95, many
with and old browsers that doesn't handle this installed - some even
with no browser installed - and they will be, for many years to come.
A friend of mine tried to deliver his shareware with HTML help only,
but the support burdon and many complaints almost took him down, so
he had to include a regular helpfile as well. Don't know what MS was
thinking, when they introduced this crappy and slow help system.
Anyway - following is from how I have implemented help.
Code:
'in declares
GLOBAL AppHelpFile AS ASCIIZ * %MAX_PATH
'in PBMAIN or WINMAIN (helpfile is in program folder)
LOCAL hPath AS LONG, zPath AS ASCIIZ * %MAX_PATH
GetModuleFileName GetModuleHandle(""), zPath, %MAX_PATH
hPath = LEFT$(zPath, INSTR(-1, zPath, "\"))
AppHelpFile = hPath & "myhelp.hlp" 'whatever..
'in dialog procedure (25& is a topic number)
CASE %IDM_HELP : lRes& = WinHelp(hWnd, AppHelpFile, %HELP_INDEX, 0&)
CASE %IDM_HLPSEARCH : lRes& = WinHelp(hWnd, AppHelpFile, %HELP_PARTIALKEY, 0&)
CASE %IDM_REGFORM : lRes& = WinHelp(hWnd, AppHelpFile, %HELP_CONTEXT, 25&)
One can also use SetWindowContextHelpId and SetMenuContextHelpId
to enable context sensitive help for a control or menu alternative..
Borge, I personally agree with you (CHM vs HLP). WINHELP offers very low-overhead, is natively supported by all Win32 platforms, and the number of problems in distributed apps are minimal.
PowerBASIC often receives requests for PDF documentation, but we dropped PDF a few years ago simply because its usage generated a massive level of tech support questions (for what was essentially someone else's product that was having problems!).
With a copy of Word97 and the free Help Compiler, you can churn out _quality_ Winhelp documentation.
I also use RoboHelp (which uses Word 97 as some form of OLE object), but I actually prefer the combination of plain Word97/HCW.
Before I posted my original message, I knew absolutely nothing about
.HLP files. I now understand that there are at least two (Win32 / HTML)
different formats, possibly three (16 bit?).
Since my last message, I was planning on creating a Win32 format .HLP
file. Now I know for sure that that is what I want to do. Thanks for
all the tips on calling the file once I've built it!
I found the www.helpmaster.com site to be very useful and I've d/l'd
the M$ compiler and the SHED hypergraphics utility plus some freeware
stuff they have (which I have not yet looked at). Now all I need to do
is learn how to build the .RTF file.....
P.S. I finally broke down and spent an hour to d/l POFFs. I saw that this
subject has been answered repeatedly. Thanks for your patience everyone...
On my site you will find inc2hlp, it converts include files to help filers.
Just take a peek at the files generated, (don't place HCW in a path and the files are kept)
These commands form the basics of the helpfile.
Footers, defines and projectfile.
Not very easy, CHM(HTML) is easier i think.
I like the CHM browse interface but i prefer helpfiles
Just a couple of words on the subject of POFFS. Don't forget that
it only is an off-line version of the complete search facility this
site offers. To get the latest possible info, I strongly recommend
using the forum search from time to time.
A complete rebuild of the program is in the makes, almost ready. It
will use some interesting custom controls, like a very fast virtual
grid list and an equally fast syntax highlight editor, etc. Think
you'll like it. Hopefully ready for beta test within a week..
------------------
[This message has been edited by Borje Hagsten (edited March 04, 2001).]
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Comment