 |
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
Ananda
Joined: 02 Aug 2005 Posts: 8 Location: Croydon
|
Posted: Tue Jun 16, 2009 6:25 pm Post subject: Using HTMLHELP with FTN95 |
|
|
Can anyone help me with using HTMLHELP api function with Salford fortran? |
|
Back to top |
|
 |
brucebowler Guest
|
|
Back to top |
|
 |
Ananda
Joined: 02 Aug 2005 Posts: 8 Location: Croydon
|
Posted: Wed Jun 17, 2009 9:56 am Post subject: |
|
|
Yes, I started a thread two years back. However, I did not get any feed back after that. I am back to this topic again as I deperatly need to do.
Here is the copy of what I said last time.
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 |
|
Back to top |
|
 |
Ananda
Joined: 02 Aug 2005 Posts: 8 Location: Croydon
|
Posted: Wed Jun 17, 2009 10:00 am Post subject: USING HTMLHELP with Salford fortran |
|
|
Sorry,
There is correction in my statement in the last post
"Following code opens a window. However, it does appears immediatly."
should be replaced as
"Following code opens a window. However, it does disappears immediatly."
Ananda |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Wed Jun 17, 2009 11:58 am Post subject: |
|
|
Ananda
There are two problems with your code.
1. You need a pause statement of some kind in the code otherwise the help window closes immediately.
2. You need to run it as a windows program (WINAPP).
Code: | WINAPP
STDCALL HtmlHelp 'HtmlHelpA' (VAL,STRING,VAL,VAL):INTEGER*4
STDCALL GetDesktopWindow 'GetDesktopWindow':INTEGER*4
INTEGER,PARAMETER::HH_DISPLAY_TOPIC=Z'0000'
INTEGER,PARAMETER::HH_INITIALIZE=Z'001C'
INTEGER,PARAMETER::HH_UNINITIALIZE=Z'001D'
CHARACTER(*),PARAMETER::hf='C:\DemoBrowser\Install\Files\vcw.chm'
INTEGER dwCookie,hwnd
LIBRARY "c:\windows\system32\hhctrl.ocx"
hwnd = GetDesktopWindow()
i=HtmlHelp(0,0,HH_INITIALIZE,LOC(dwCookie))
i=HtmlHelp(hwnd,hf,HH_DISPLAY_TOPIC,0)
i=winio@('%bt[Exit]')
i=HtmlHelp(0,0,HH_UNINITIALIZE,dwCookie)
end
|
|
|
Back to top |
|
 |
Ananda
Joined: 02 Aug 2005 Posts: 8 Location: Croydon
|
Posted: Wed Jun 17, 2009 1:32 pm Post subject: USING HTMLHELP with Salford Fortran |
|
|
Dear Paul,
Thank you very much for your reply. It is working. Now I need to play with the code to select a specfic topic on demand.
Ananda |
|
Back to top |
|
 |
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2402 Location: Yateley, Hants, UK
|
Posted: Tue Jun 23, 2009 1:19 pm Post subject: |
|
|
There is a MUCH, MUCH, easier way to use hypertext help. This is the menu stuff:
Code: | IA=WINIO@('%mn[&Help[User manual...]]&', Manual_Function)
IA=WINIO@('%mn[[|,&About Program]]&', About_Function) |
Manual_Function looks like this:
Code: | INTEGER FUNCTION Manual_Function()
INCLUDE <WINDOWS.INS>
CALL START_PPROCESS@('HH.EXE','Helpfile.chm')
Manual_Function = 1
END |
All you need to do is launch your help file as the "data" for the WIndows Hypertext Help viewer.
Creating chm files with searchable indexes, contents lists etc is tedious, but can be done with free software, for example HelpMaker from Vizacc.com
Regards
Eddie |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8210 Location: Salford, UK
|
Posted: Sat Jul 04, 2009 8:34 am Post subject: |
|
|
Eddie
You are right in saying that your method is much easier but calling HtmlHelp, in theory, allows you to directly access given topics etc. |
|
Back to top |
|
 |
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2402 Location: Yateley, Hants, UK
|
Posted: Sun Jul 05, 2009 5:50 pm Post subject: |
|
|
Paul,
MSDN reckons that you can access given topics in a .chm file using HH.EXE ....
Eddie |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|