replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - Using HTMLHELP with FTN95
forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Using HTMLHELP with FTN95

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
Ananda



Joined: 02 Aug 2005
Posts: 8
Location: Croydon

PostPosted: Tue Jun 16, 2009 6:25 pm    Post subject: Using HTMLHELP with FTN95 Reply with quote

Can anyone help me with using HTMLHELP api function with Salford fortran?
Back to top
View user's profile Send private message
brucebowler
Guest





PostPosted: Tue Jun 16, 2009 9:09 pm    Post subject: Reply with quote

Can you be more specific about the problems you're having?

and I assume you've seen this thread - http://forums.silverfrost.com/viewtopic.php?t=810, since you started it 2 years ago Confused
Back to top
Ananda



Joined: 02 Aug 2005
Posts: 8
Location: Croydon

PostPosted: Wed Jun 17, 2009 9:56 am    Post subject: Reply with quote

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
View user's profile Send private message
Ananda



Joined: 02 Aug 2005
Posts: 8
Location: Croydon

PostPosted: Wed Jun 17, 2009 10:00 am    Post subject: USING HTMLHELP with Salford fortran Reply with quote

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
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8210
Location: Salford, UK

PostPosted: Wed Jun 17, 2009 11:58 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
Ananda



Joined: 02 Aug 2005
Posts: 8
Location: Croydon

PostPosted: Wed Jun 17, 2009 1:32 pm    Post subject: USING HTMLHELP with Salford Fortran Reply with quote

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
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2402
Location: Yateley, Hants, UK

PostPosted: Tue Jun 23, 2009 1:19 pm    Post subject: Reply with quote

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
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8210
Location: Salford, UK

PostPosted: Sat Jul 04, 2009 8:34 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2402
Location: Yateley, Hants, UK

PostPosted: Sun Jul 05, 2009 5:50 pm    Post subject: Reply with quote

Paul,

MSDN reckons that you can access given topics in a .chm file using HH.EXE ....

Eddie
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
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