Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Calling HTML help

davidgraham
Beginner
474 Views
I have at last updated my help to HTM help.
All I have to do is change the calling procedure.
I changed MyApp.hlp to MyApp.chm but I get the message "The C:MyAppMyApp.chm file is not a Windows Help file, or the file is corrupt."
The help file is OK as I can double click on it to open it.
What am I doing wrong?
David
case (IDM_HELPCONTENTS)
lpszHelpFileName =trim(MyAppDir)//"MyApp.chm"C
lpszContents = "CONTENTS"C
if (WinHelp (hWnd, lpszHelpFileName, HELP_FINDER,LOC(""C)) .EQV. .FALSE.) then
call MsgBox ("Unable to activate help"C,"S")
end if
0 Kudos
6 Replies
Jugoslav_Dujic
Valued Contributor II
474 Views
WinHelp calls are not compatible with HTML Help.
Instead, you need to call HtmlHelp API (and linkwith HtmlHelp.lib from HH Workshop). You can download CVF headermodule from my home page -- it's not included in current CVF API translations.
Jugoslav
0 Kudos
davidgraham
Beginner
474 Views

I have had another look at this and I see that I should be calling HTMHelp rather than WinHelp.

I'm not sure whatthe parameters are. Has anyone an example?

Thanks, David

0 Kudos
davidgraham
Beginner
474 Views
Thanks,
I have downloaded your HTMLhelp.f90 and added it to my project.
I'm not sure about the parameters to call it.
I've added an interface, but het the message
"error LNK2001: unresolved external symbol _HtmlHelpA@16"
I didn't link in a .lib file - as I wasn't sure if it was required or how to do it.
David
0 Kudos
Jugoslav_Dujic
Valued Contributor II
474 Views
The lib file is provided with HTMLHelp workshop (IIRC HtmlHelp.lib) -- consider adding its .lib directory into Tools/Options/Directiries/Library files. Then, add "HtmlHelp.lib" into your Project/Settings/Link.
I gotta run right now, but the usage is rather similar to WinHelp -- most constants have similar or identical suffix and the same meaning. Check out the MSDN Docs (links on my home page).
Jugoslav
0 Kudos
davidgraham
Beginner
474 Views

Thanks, I got the HTMLhelp.lib to work.

One of the differences to WinHelp is that the file name doesn't need the 'C' on the end.

David

0 Kudos
Jugoslav_Dujic
Valued Contributor II
474 Views
Huh? It's of type LPCSTR, meaning C-style string; if you omit terminating char(0), it might work, but there's no guarantee.
0 Kudos
Reply