Can anyone tell me how to use HtmlHelp API routine with Salford Fortran FTN95.
Using HtmlHelp
Ananda
I have had a quick look at this for you but I cannot get a simple test to run. The problem is something to do with the linking process and user32.dll being relocated. It may be possible to get SLINK to do the right thing but I do not know how to do this. Here is the code for my initial attempt...
STDCALL HTMLHELP 'HtmlHelpA' (VAL,STRING,VAL,VAL):INTEGER4 INTEGER,PARAMETERHH_INITIALIZE=Z'001C' INTEGER,PARAMETERHH_UNINITIALIZE=Z'001D' INTEGER dwCookie LIBRARY 'c:\windows\system32\hhctrl.ocx' dwCookie = 0 i=HtmlHelp(0,0,HH_INITIALIZE,LOC(dwCookie)) print, i, dwCookie i=HtmlHelp(0,0,HH_UNINITIALIZE,dwCookie) END
Ananda
If you simply want to launch a .chm file then you could use the ShellExecute API function otherwise you could try putting the HtmlHelp code into a function (maybe in a DLL) written in C.
Regards
Paul
Dear Paul,
Thank you very much for the reply. You gave me enough information to start playing with the HtmlHelp API. However, I haven't yet suceeded in producing anything useful.
I have been using winhelp to display selected help topics. Using command like:
LERR=winhelp(ihwnd,'C8INFO.HLP'//char(0),1,I_Topic_ID)
As with Vista, winhelp is not supported anymore, I am now trying to replace winhelp with HtmlHelp commands to display specific help topics from .chm file.
Following code opens a window. However, it does appears immediatly.
STDCALL HTMLHELP 'HtmlHelpA' (VAL,STRING,VAL,VAL):INTEGER*4
INTEGER,PARAMETER::HH_DISPLAY_TOPIC=Z'0000'
INTEGER,PARAMETER::HH_HELP_CONTEXT=Z'000F'
INTEGER,PARAMETER::HH_INITIALIZE=Z'001C'
INTEGER,PARAMETER::HH_UNINITIALIZE=Z'001D'
INTEGER dwCookie
LIBRARY 'c:\\windows\\system32\\hhctrl.ocx'
dwCookie = 0
i=HtmlHelp(0,0,HH_INITIALIZE,LOC(dwCookie))
print*, i, dwCookie
i=HTMLHELP(0,'c8_help\\c8info.chm'//char(0),HH_DISPLAY_TOPIC,
+ 0)
c + 'html\c8in0001.htm') c i=HTMLHELP(0,'D:\contram\c7\c8_help\c8info.chm',HH_HELP_CONTEXT, c + 1000) write(,)i i=HtmlHelp(0,0,HH_UNINITIALIZE,dwCookie) write(,)i end
Ananda