FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Help needed with Help
Posts: 17
Joined: Sun Jan 28, 2007 11:47 AM
Help needed with Help
Posted: Sun Apr 01, 2007 08:35 PM

I am trying to call specific topics from a HTML Help file with the following line of code:
HTMLHelp(0, "d:\turboint\help\tvwinint.chm", 2, nTopic)
but no matter what the topic nr is it always comes up with the first topic (default).
How do I need to change to code?

Regards,
Stephan

Posts: 17
Joined: Sun Jan 28, 2007 11:47 AM
Help needed with Help
Posted: Mon Apr 02, 2007 10:27 PM

Oke, I think I found it.
When using the function as follows
HtmlHelpPopup(0, "d:\turboint\help\tvwinint.chm", 0, "idh_introduction.htm") it works, BUT not always. It randomly GPF's.
Has anybody why these random GPF's occur?

Regards,
Stephan

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Help needed with Help
Posted: Mon Apr 02, 2007 10:38 PM

Stephan,

We have tested HTMLHelp(0, "d:\turboint\help\tvwinint.chm", 2, nTopic)
and it GPFs both in XP and Vista :-(

Its difficult to know why as we are invoking an OCX (as a DLL) function

maybe we should try a direct call implementing a C wrapper instead of using DLL FUNCTION command

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 17
Joined: Sun Jan 28, 2007 11:47 AM
Help needed with Help
Posted: Mon Apr 02, 2007 11:06 PM

Thanks ANtonio. Would be most welcome if you could find a solution for this problem

Regards,
Stephan

Posts: 17
Joined: Sun Jan 28, 2007 11:47 AM
Help needed with Help
Posted: Mon Apr 02, 2007 11:40 PM

Antonio,

in the C:\BCC55\INLUDE I found htmlhelp.h.
Could this file be of any help to find another solution?

Regards,
Stephan

Posts: 17
Joined: Sun Jan 28, 2007 11:47 AM
Help needed with Help
Posted: Tue Apr 03, 2007 02:36 PM

The problem is that VISTA does not support classic help (.HLP) anymore, so we will have to change to Html Help.
Any suggestion to fix this problem is welcome.

Regards,
Stephan

Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM
Help needed with Help
Posted: Tue Apr 03, 2007 04:35 PM

Stephan

You can download the appropriate dll from microsoft msdn to support help files

If you click on a hlp file under vista, you will be guided to the appropriate link. Then you can use all hlp files under vista.

I have downloaded the file a month ago but i do not remember the link

HTH

Richard

http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
Posts: 17
Joined: Sun Jan 28, 2007 11:47 AM
Help needed with Help
Posted: Tue Apr 03, 2007 09:10 PM

Hi Richard,

thanks for advice, but which dll are you pointing at? Is it htmlhelp.dll? Can you sent it to my?
If have search the web for that file but couldn't find it.

The frusting think is that this can work, at least it works with a small Xailer program I wrote. Both Xailer and FHW are build on xHarbour, so..

Regards,
Stephan

Posts: 17
Joined: Sun Jan 28, 2007 11:47 AM
Help needed with Help
Posted: Thu Apr 05, 2007 08:03 PM

This could be a solution: simply call HH.EXE with some parameters.
Winexec("HH.EXE <nTopic> <myhelpfile.chm>")
It actually works (if HTMLHelp is installed of course).

Now there is another problem: At startup there is definition for F1:
SetKey( 28, { |nKey| MyHtmlHelp(IDH_INTRODUCTION) } )
Pressing F1 should call the function MyHtmlHelp(), but instead there is message 'No HELP file available'. Although not defined by me the function HelpTopic() is called. What can I do to change this behaviour?

Regards,
Stephan

Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Help needed with Help
Posted: Thu Apr 05, 2007 08:49 PM
#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg

    LOCAL cVar := SPACE( 30 )

    SETKEY( VK_F1, { || MyHelp() } )

    DEFINE DIALOG oDlg

    @ 1, 1 GET cVar

    @ 3, 1 BUTTON "&Close" ACTION oDlg:End()

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL


STATIC FUNCTION MYHELP()

    ? "Help!"

    RETURN NIL


FUNCTION HELPINDEX()

    RETURN NIL


FUNCTION HELPTOPIC()

    RETURN NIL


FUNCTION HELPPOPUP()

    RETURN NIL


EMG
Posts: 17
Joined: Sun Jan 28, 2007 11:47 AM
Help needed with Help
Posted: Thu Apr 05, 2007 09:45 PM

YES, thos works. Thanks Enrico!

Regards,
Stephan

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Help needed with Help
Posted: Fri Apr 06, 2007 06:49 AM

Stephan,

Have you looked at the FWH help file modifications I made for HTML help? They are available on my website here:

http://ourworld.compuserve.com/homepage ... rogram.htm

Look for "CHM Help Code"

It has been quite some time since I wrote them so I don't remember exactly what is there, but perhaps it will answer some of your questions.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 17
Joined: Sun Jan 28, 2007 11:47 AM
Help needed with Help
Posted: Fri Apr 06, 2007 06:59 AM

Thanks you James.
It seems your solution is the same as the one I found.

Regards,
Stephan

Continue the discussion