Discussion:
Looking for Tips on hpj (rtf) to hhp (html) conversion
(too old to reply)
hls
2009-08-25 01:25:04 UTC
Permalink
Folks,

I have an old HLP help file with an RTF that I would like to convert
convert. I use the HTML Help work shop to explore this, opening the
HPJ file and the Convert Wizard starting up. It has for the target HHP
file and basically give it the same folder and project name with the
HHP extension. It then proceeded to successfully create:

- hhp project file
- hhk keyword index file
- html\*.htm (735 files)

It looks like it used some serial numbering for the *.htm files. So
its hard to tell which files are what to begin reorganizing them under
proper file naming.

The compiled CHM shows only a keyword list, and it appears it created
some table of content for the sections which is something we
definitely want to change/reorganize.

But I guess part of my questions I have is;

The HLP file was used for dialog based page help display and also
context sensitive help. The RTF file was edited with MS Word and the
headers, footers and bookmarkings were used to mark the sections
footer information matching the IDH_ defines in the *.HH file.

Were the IDH_ defines in my *.HH mapped in the conversion? So it can
be still be used to display sensitive help or a topic page display?

Are there any tips you can provide for the conversion?

TIA

--
hls
2009-08-25 02:52:20 UTC
Permalink
Now that I am further along, I would like to illustrate what I "think"
I am looking for in terms in automating or at least getting far enough
that would make this a smooth conversion process.

Using one help field for an example, currently in one dialog, I have a
field with a control id and content sensitive help index number:

IDC_LOCALRPC
IDH_LOCALRPC

For the current HLP based RTF file, I have the help content for this
popup bookmarked under WORD in the footer for this IDH_LOCALRPC reference.

In my current C/C++ application, all the dialogs and controls are
using a wrapper help class to help setup the help display. I use a
mapped array containing the control indices vs help indices, including
IDC_LOCALRPC control index with the IDH_LOCALRPC help index. Hitting
F1 or dropping the the ? icon on the control nicely popups the help
display.

Now with the HTML workshop conversion, for this control, it pulled
from the RTF-based help file the content and created a html file:

html\wcco84mx.htm

and inside of this, I see A tag NAME= link

<P><A NAME="idh_localrpc"></A>.... text ..../P>

What I would to know is how can I "leverage" this (and all the other
similar *.HTM creations) to automatically continue with a content
sensitive help now using the CHM file?

For example, I could write a scanner to read all these html\*.htm
files, look for the ones where there is NO TITLE because it appears
these htm files intended for popup content don't have a title. It
would extract the IDH_XXXXX from the A tag Name attribute and create a
map file ofIDX_XXXXXXXXXX vs html\*.htm files.

What I asking is I am wasting time with this because there is an
existing provided method to handle this? i.e. the conversion did it
this way to allow referencing the popup directly?

I hope this make sense. :)

--
HLS


html/wcco84mx.htm
Post by hls
Folks,
I have an old HLP help file with an RTF that I would like to convert
convert. I use the HTML Help work shop to explore this, opening the HPJ
file and the Convert Wizard starting up. It has for the target HHP file
and basically give it the same folder and project name with the HHP
- hhp project file
- hhk keyword index file
- html\*.htm (735 files)
It looks like it used some serial numbering for the *.htm files. So its
hard to tell which files are what to begin reorganizing them under
proper file naming.
The compiled CHM shows only a keyword list, and it appears it created
some table of content for the sections which is something we definitely
want to change/reorganize.
But I guess part of my questions I have is;
The HLP file was used for dialog based page help display and also
context sensitive help. The RTF file was edited with MS Word and the
headers, footers and bookmarkings were used to mark the sections footer
information matching the IDH_ defines in the *.HH file.
Were the IDH_ defines in my *.HH mapped in the conversion? So it can be
still be used to display sensitive help or a topic page display?
Are there any tips you can provide for the conversion?
TIA
--
hls
2009-08-25 08:16:22 UTC
Permalink
Follow up.

I think I am 99% there, with the last item being popups. If someone
can help clarify a few things about "popups" I think this conversion
project is done.

Overall, I am trying to leverage as much as possible the HTML workshop
conversion result of my HPJ winhelp to HPP CHM help. It created a HHP
and HHK file and a subfolder with over 750+ HTML\*.HTM files.
These files originated as RTF content either as page/topic displays
for dialogs and/or popup displays for dialog controls. Each file has
a <A> tag in the format per file:

<A NAME="IDH_XXXXX">Title</A>

I already have a WCCONFIG.HH file with all my IDH_ defines. So I wrote
a quick utility to parse all these files to pull the IDH_XXXXX string
to create map file called ALIAS.INC. Each line having:

IDH_XXXXX=html\wccYYYY.HTM; title

Then I added the sections to the HHP file:

[ALIAS]
#include alias.inc

[MAP]
#include wcconfig.hh

This works nicely when displaying the topic pages, with the call:

HtmlHelp(NULL,
AfxGetApp()->m_pszHelpFilePath,
HH_HELP_CONTEXT,
m_nIDHelp);

Where m_nIDHelp is set per page for the dialogs IDH_xxxxx value.

Each page also has the DWORD array m_IDH_Map of IDC_XXXX vs IDH_XXXX
indices, so for control popups I have:

HtmlHelp((HWND)((LPHELPINFO)lParam)->hItemHandle,
AfxGetApp()->m_pszHelpFilePath ,
HH_TP_HELP_WM_HELP,
(DWORD)m_IDH_Map);

This does not work. I get the error saying the help file is not found.

So looking at the API reference for the possible context-sensitive
help commands:

HH_DISPLAY_TEXT_POPUP
HH_DISPLAY_TOPIC
HH_HELP_CONTEXT
HH_TP_HELP_CONTEXTMENU
HH_TP_HELP_WM_HELP

If I understand these corrected, it works with have a separate text
file with all the content for each IDH_xxxxxx and this text file needs
to be part of the filename parameter, or with HH_DISPLAY_TEXT_POPUP
pass the text via an HH_POPOP.

It is possible to utilize the HTML\*.HTM files which already contains
the content for the popups?

Any suggestions?

---
HLS
Now that I am further along, I would like to illustrate what I "think" I
am looking for in terms in automating or at least getting far enough
that would make this a smooth conversion process.
Using one help field for an example, currently in one dialog, I have a
IDC_LOCALRPC
IDH_LOCALRPC
For the current HLP based RTF file, I have the help content for this
popup bookmarked under WORD in the footer for this IDH_LOCALRPC reference.
In my current C/C++ application, all the dialogs and controls are using
a wrapper help class to help setup the help display. I use a mapped
array containing the control indices vs help indices, including
IDC_LOCALRPC control index with the IDH_LOCALRPC help index. Hitting F1
or dropping the the ? icon on the control nicely popups the help display.
Now with the HTML workshop conversion, for this control, it pulled from
html\wcco84mx.htm
and inside of this, I see A tag NAME= link
<P><A NAME="idh_localrpc"></A>.... text ..../P>
What I would to know is how can I "leverage" this (and all the other
similar *.HTM creations) to automatically continue with a content
sensitive help now using the CHM file?
For example, I could write a scanner to read all these html\*.htm files,
look for the ones where there is NO TITLE because it appears these htm
files intended for popup content don't have a title. It would extract
the IDH_XXXXX from the A tag Name attribute and create a map file
ofIDX_XXXXXXXXXX vs html\*.htm files.
What I asking is I am wasting time with this because there is an
existing provided method to handle this? i.e. the conversion did it this
way to allow referencing the popup directly?
I hope this make sense. :)
--
HLS
html/wcco84mx.htm
Post by hls
Folks,
I have an old HLP help file with an RTF that I would like to convert
convert. I use the HTML Help work shop to explore this, opening the
HPJ file and the Convert Wizard starting up. It has for the target HHP
file and basically give it the same folder and project name with the
- hhp project file
- hhk keyword index file
- html\*.htm (735 files)
It looks like it used some serial numbering for the *.htm files. So
its hard to tell which files are what to begin reorganizing them under
proper file naming.
The compiled CHM shows only a keyword list, and it appears it created
some table of content for the sections which is something we
definitely want to change/reorganize.
But I guess part of my questions I have is;
The HLP file was used for dialog based page help display and also
context sensitive help. The RTF file was edited with MS Word and the
headers, footers and bookmarkings were used to mark the sections
footer information matching the IDH_ defines in the *.HH file.
Were the IDH_ defines in my *.HH mapped in the conversion? So it can
be still be used to display sensitive help or a topic page display?
Are there any tips you can provide for the conversion?
TIA
--
Ulrich Kulle [MVP]
2009-08-25 18:24:55 UTC
Permalink
Hello HLS,
Post by hls
Are there any tips you can provide for the conversion?
you may know - there is a freeware tool HHPMOD created by Sid that will automatically rewrite and rename the cryptic named files
produced by HTML Workshop to the original Winhelp topic names. It will also create a new HTML help project that will link to
your .h context id files.
It might save you some work. It works best on the files right after they have been created by HTML workshop, before any editing
has been done. You can get it at:
http://post.queensu.ca/~penstone/HHPMod/HHPMod_info.html

Some notes at my site (you know the most):
http://www.help-info.de/en/Help_Info_WinHelp/hw_converting.htm
--
Best regards
Ulrich Kulle
Microsoft MVP - Help
***********************************
http://www.help-info.de
***********************************
hls
2009-08-25 22:47:36 UTC
Permalink
Thanks, I think I am past this part. What I need to figure out is how
to leverage the html\*.htm as popups. This was a relative huge online
help and I don't want to rewrite the entire thing.

Thanks
Post by Ulrich Kulle [MVP]
Hello HLS,
Post by hls
Are there any tips you can provide for the conversion?
you may know - there is a freeware tool HHPMOD created by Sid that will
automatically rewrite and rename the cryptic named files produced by
HTML Workshop to the original Winhelp topic names. It will also create a
new HTML help project that will link to your .h context id files.
It might save you some work. It works best on the files right after they
have been created by HTML workshop, before any editing has been done.
http://post.queensu.ca/~penstone/HHPMod/HHPMod_info.html
http://www.help-info.de/en/Help_Info_WinHelp/hw_converting.htm
CEE453
2009-08-26 16:18:30 UTC
Permalink
Hi hls:
I did not find an easy automatic way to restore the popups using the
converted .htm files. What I did was
create a JavaScript .js file, and select the text and the matching topic_ids
from each popup .htm file, and
transfer them to the .js file. Then I added the call to the hhctrl.ocx to
each of the .htm files that call the popups.
I described the process in my "Notes on Fixing HTML Help" you can get from
http://post.queensu.ca/~penstone/notes_on_fixing_html_help.html . My utility
HHPMod that you can
get here as well will scan the converted project and give you a scan log
that will list the names of the
popup files, and the names of the .htm files that contain links to the
popups.
(Automating this process of restoring the popups is in my"TODO" list for
HHPMod...)

Good luck,
Sid Penstone
Thanks, I think I am past this part. What I need to figure out is how to
leverage the html\*.htm as popups. This was a relative huge online help
and I don't want to rewrite the entire thing.
Thanks
Post by Ulrich Kulle [MVP]
Hello HLS,
Post by hls
Are there any tips you can provide for the conversion?
you may know - there is a freeware tool HHPMOD created by Sid that will
automatically rewrite and rename the cryptic named files produced by HTML
Workshop to the original Winhelp topic names. It will also create a new
HTML help project that will link to your .h context id files.
It might save you some work. It works best on the files right after they
have been created by HTML workshop, before any editing has been done. You
http://post.queensu.ca/~penstone/HHPMod/HHPMod_info.html
http://www.help-info.de/en/Help_Info_WinHelp/hw_converting.htm
hls
2009-08-30 03:23:25 UTC
Permalink
Hi Sid,

I wanted to note that I wrote a set of C/C++ parsers and conversion
code that pretty much returns the HPJ to HHP converted help to provide
a dialog full help page and the context sensitive help POPUP window
for the dialog fields. I am thinking of providing the C/C++ source
code and with the help some volunteers if possible to clean it up and
make it available for others. If anyone is interested, post a note
and I will being the process.

I do have a question regarding the POPUP help giving a GPF at the
wincore.cpp MFC RTL. Posting a new topic for this.

Thanks

--
HLS
Post by CEE453
I did not find an easy automatic way to restore the popups using the
converted .htm files. What I did was
create a JavaScript .js file, and select the text and the matching topic_ids
from each popup .htm file, and
transfer them to the .js file. Then I added the call to the hhctrl.ocx to
each of the .htm files that call the popups.
I described the process in my "Notes on Fixing HTML Help" you can get from
http://post.queensu.ca/~penstone/notes_on_fixing_html_help.html . My utility
HHPMod that you can
get here as well will scan the converted project and give you a scan log
that will list the names of the
popup files, and the names of the .htm files that contain links to the
popups.
(Automating this process of restoring the popups is in my"TODO" list for
HHPMod...)
Good luck,
Sid Penstone
Loading...