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)