RE: Using CHM Help Files from Euphoria
Ron Tarrant wrote:
> I've been hacking away at trying to display a .chm (compiled HTML
> Help) file from within a Euphoria program, but I'm getting nowhere.
Never mind, I figured it out.
For anyone else who's curious:
-------- start snippet ------------------
global integer callWindowsHelp, libHtmlHelp
-- register the HTML Help library
libHtmlHelp = registerw32Library("hhctrl.ocx")
-- get an id for the HtmlHelpA routine in hhctrl.ocx.
callWindowsHelp = registerw32Function(libHtmlHelp, "HtmlHelpA", {C_INT,
C_INT, C_INT, C_INT}, C_INT)
-- a sample calling routine:
procedure LetsCallWinHelp(sequence FileName, -- help file name
atom command, -- type of help needed
atom data) -- value related to type of command
atom file_ptr, start
-- how to pass messages to the help engine !!
file_ptr = acquire_mem(0, FileName)
start = w32Func(callWindowsHelp, {getHandle(myWindow), file_ptr,
command, data})
release_mem(file_ptr)
end procedure
-- and it's called like this:
LetsCallWinHelp("my_help_file.chm", #0002, 0)
Note: When calling WinHelpA(), the command value for viewing the help
TOC was #0003, but in HtmlHelpA() it's #0002.
-Ron T.
|
Not Categorized, Please Help
|
|