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

 
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: Fri Jun 15, 2007 2:13 pm    Post subject: Using HtmlHelp Reply with quote

Can anyone tell me how to use HtmlHelp API routine with Salford Fortran FTN95.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Sun Jun 17, 2007 9:05 am    Post subject: Reply with quote

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):INTEGER*4
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,0,HH_UNINITIALIZE,dwCookie)
END
Back to top
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


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

PostPosted: Mon Jun 18, 2007 8:55 am    Post subject: Reply with quote

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



Joined: 02 Aug 2005
Posts: 8
Location: Croydon

PostPosted: Mon Jun 18, 2007 1:36 pm    Post subject: Reply with quote

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
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