Create a Help Project. Aka make a .chm file that probably won’t work
Part 2 A walkthrough example
Part 2b) Getting a .chm file that might launch from the help argument options in InputBox Function
_4_ Buggery Feature Context-Sensitive Help ( InputBox Function )
A special form Of Cursor Lock:= was used when the Microsoft data base xxxxs developed a few things:
Cursor Lock:= Load of dis coordinated Bollox aka Another mess and it does not work ever not even from the start but don’t tell anyone maybe they won’t notice.
From the last post we see that for _ InputBox Function ' If helpfile:= is given , then context must also be provided. ( This is not the case for Application.Help, - the HelpContextID can be omitted. )
But possibly someone that should have taken that into consideration forgot about or did not know that . Oh dear.
In fact, frequently a problem arises ( not just in the case of the InputBox when calling up a help Window ) : You may get an unexpected error, or rather an error message , something of the form
___ HH_HELP_CONTEXT called without a [MAP] section
HH_HELP_CONTEXTcalledwithoutaMAPsection.JPG https://imgur.com/8NOQW95
( The code may go on further never the less , after hitting OK, or even in some case it will move on whilst the Message box is still showing, but the Help Window you wanted will not be shown.
The following workaround may get around this problem.
Workaround: ( Patch up the .hhp file )
From this point I am not quite sure what it is that I am doing, but it appears that some “directions” are missing. These are necessary to satisfy one of the standard Windows programs ( API ddl stuff: http://www.eileenslounge.com/viewtopic.php?f=18&t=28885 ) which is called into use , for example, by the the context:= argument parameter, which in the case of the InputBox Function is not optional once the helpfile:= is given.
## The main project file ( the file with the .hhp extension ) can be opened with a text editor such as Notepad++. Or at least if you do that something is displayed which you can edit as if it was normal text. What you see there is similar to what you see in the left hand window of the HTML Help Workshop window after you have a created/ compiled project:
One way to get to this is in the Windows File explorer Window select and right click mouse to get the option to Edit with Notepad++
RightClickOnhhpFileOpenWithNotepadPlusPlus.JPG https://imgur.com/7AOgfiQ
By modifying the .hhc project File in Notepad, saving that, and then opening the hhc project file in Microsoft HTML Workshop, and finally compiling will result in the changes reflected in the final .chm file
These following changes, taking the current working example as example will illustrate the added information which appears to add the “missing directions”
Part of the initial File looks something like this, here in this example showing two HTML Files:
Somewhere under that must be added something to give finally in place of that above , the following final text shown below
After doing this, the file must be opened in Microsoft HTML Help Workshop and compiled to produce a new .chm
Usually then I got success in calling up a help window from a code line including both of the two options
of
HelpFile:=
and
the context:= or HelpContextID:=.
Exactly what is going on there is anyone’s guess, or those that know won’t tell, maybe as they forgot to get the whole thing co coordinated correctly from the start. For some unknown reason a constant variable must first be associated with a File, ( That is the AliAS stuff ), after which a number can be given to that variable.
I got this info from various reported ways to fix various bugs, ( those were not directly related to anything to do with the InputBox Function ), so I expect there are some integrate internal coding reasons for having to do this bodge ( workaround )
Note also interestingly, that in both the case _... of the
_ InputBox __ ‘ including HelpFile:=, and context:=
and the
_ Application.Help __ ‘ including the optional HelpContextID:= argument
_... as long as valid sections are given in the hhc “text” section, then the code will not error if a non existent Context number is given. In this case no help window comes up.
If a valid ( existent ) context number is given then… if you are lucky… it works finally !!!!
_...____
So I got it to work., finally….
I went through worked examples following all the stuff that I have tried to explain in the last few posts..
Then when I run a code like this:
This is what happens:
First an InputBox pops up,
and then
if you select the Help Button, ….. then a help Window comes up
HelpGetUpBollox.JPG https://imgur.com/KdKOYWr
Conclusions:
I think am happy to mark this thread as [Solved].
I have got as far as making the_..
HelpFile:= HelpContextID:=
( or rather the InputBox Function which works
HelpFile:= Context:= )
_..options in the typical “simple Pop up user interface message box / input box” to work, after a fashion, to do whatever it is that they should do.
What they should do is at least clear now:, ( Obvious to some maybe.. but no documentation says this clearly … ): The typical _ helpfile / context _ optional arguments should cause an extra button to appear which when Hitting should launch a Window which is part of the “integrated Microsoft Help” thingy.
I have gone where probably not many have in recent years, and that is to get working examples.
I’ve got far enough to realise that the “integrated Microsoft Help” thingy might have been somebody’s career making pet idea for a while and seemed a good idea at the time. In the mean time it is a mess and usually does not work.
It would probably be better to go back to writing notes on the back of a Beer mat
( And don’t bother with the drink Microsoft 'Kool Aid'. – drink something better. I can recommend some good dark German Bier )
[Solved]
Alan
P.s.
( Any comments or further inputs would be very welcome, Thanks )
Ref
https://msdn.microsoft.com/en-us/lib...(v=vs.85).aspx
https://www.codeguru.com/cpp/w-p/hel...-HTML-Help.htm
https://support.microsoft.com/de-de/...sensitive-help
http://www.help-info.de/en/Help_Info...context-id.htm
Some general notes:
Files:
hhp _ is a project File. The big thing that you usually will want to create as / with _ File --- New _ with HTML Help Workshop or other software. This will somehow contain or at least “manage” somehow the following 3 file types
“data” type files, which are used in
hhc _ is a Help table of contents, usually just 1 I think
hhk _ is a Help index, usually just one I think
htm _ are fairly standard HTML file thingies. If you read any good introduction article, book or watch a good introductory You tube video then you will soon get the general idea
https://www.youtube.com/watch?v=1gLh...D6F7E289625976
These HTML files contain as main part the bulk of all the text and other stuff you actually want to read. If you are lucky then you might find that simply double clicking on them will “bring them up” as normal looking stuff to read. This probably will come up in your internet browser: Most browsers I expect recognise these types of files, and you can also probably get them up manually if you copy the whole string path and file name and then paste it into the URL bar of your browser ( URL Bar = the place where you usually see the long _ https://www.goog………………. _ – In place of that paste in the _ G:\Excel0202015Jan2016\Ex……………\Part2.htm )
Modifying Files:
The hhp file opens in Notepad ++ and shows some text. ## This was useful in order to modify to add those missing [ALIAS] and [MAP] bits
All other files can be opened and modified in a text editor such as Notepad or Notepad ++
Actually making/ modifying a “Project”:
I’m buggered if I could actually work out how to use the HTML Help Workshop Development Window in the efficient way that I expect it should be.
I expect the idea is that you move around and modify the HTML Files and some how do all the index and contents automatically. But god knows how.
This is how I actually got the stuff working…
Way a) manipulate all files with text editors… mostly !!
The hhc and hhk files ( List index contents stuff ) look similar and have to stay similar, at least as far as how the HTML files they reference is concerned.
You open them up with a text editor, preferably both at the same time, and make sure that the HTML Files that they reference exist.
Changehhkhhchtm.JPG https://imgur.com/0gMOk8J
Once you have done that, then you don’t actually have to “load the HTML Files”… when you make a new project… these files, and / or the hhp file and / or the complied .chm “ know where they are and what to do with them.
The HTML Files you then modify manually by opening them up in a text document .. or even in Word it seems possible !!
Default Topic Index Page Title Page
The hhc File and the bit of the hhp File that opens in a Notepad ++ and the left margin window must all reference the same Default topic=, but god knows what that is – it seems to be some HTML file that must also exist
So you need to change 4 things simultaneously,
_ 1 hhc File in a text document
_ 2 the bit of the hhp File that opens in a Notepad ++
_ 3 !! and for this you have to be in the Microsoft HTML Help Workshop Development Environment .. modify the left margin window bit .. Project .. [OPTIONS] …..
_ 4 the name of the HTML file
IndexPage_1_2_3_4.JPG https://imgur.com/ztE5ZES
Way b) In the Microsoft HTML Help Workshop Development Environment
Select either the Contents or Index tab ( to right of the Project tab ) , and double click on the bit you want to modify. The corresponding HTML File comes up the main big window and you can work on it similarly to as if you had opened with a text program such as Notepad or Notepad++
Bookmarks