Integrating Help *.chm files in FORTRAN applications

Paul Curtis
Total Points:
2,390
Status Points:
1,890
Brown Belt
June 27, 2009 6:40 AM PDT
Rate
 
#1
Quoting - dannycat
I'm about to embark in creating a help system for my application. Most current help compilers create HTML Help files (*.chm) whereas previously WinHelp (*.hlp) files were the norm. Apparently the support for Winhelp (*.hlp) has been withdrawn by Microsoft with the advent of Vista. Although you can still download the WinHelp I prefer to use the current format. My question is how do you call up the HTML format help files from within a windows application.  The Generic sample provided still utilises the WinHelp API function which does not recognise HTML files.

Add the attached .lib file to your project.  Use this interface:

INTERFACE 
	FUNCTION HtmlHelp (hWndMain, lpszHelp, uCommand, dwData)
		USE ifwinTY
		integer(BOOL) :: HtmlHelp ! BOOL
		!DEC$ ATTRIBUTES DEFAULT, STDCALL, DECORATE, ALIAS:'HtmlHelpA' :: HtmlHelp
		integer(HANDLE) hWndMain ! HWND hWndMain
		!DEC$ ATTRIBUTES REFERENCE, ALLOW_NULL :: lpszHelp
		character*(*) lpszHelp ! LPCSTR lpszHelp
		integer(UINT) uCommand ! UINT uCommand
		integer(ULONG_PTR) dwData ! ULONG_PTR dwData
	END FUNCTION
END INTERFACE

and then your procs will need to process WM_HELP in the message loop handler:

CASE (WM_HELP)
	rval = HtmlHelp (ghwndmain, helppathname, HH_DISPLAY_TOPIC, NULL)



 Attachments 

Intel Software Network Forums Statistics

8487 users have contributed to 31625 threads and 100705 posts to date.
In the past 24 hours, we have 36 new thread(s) 120 new posts(s), and 186 new user(s).

In the past 3 days, the most popular thread for everyone has been gemm(A,A,A) like possible? The most posts were made to gemm(A,A,A) like possible? The post with the most views is Dear Steve, excuse me for a d

Please welcome our newest member chat1983