1. Windows help help
- Posted by Mike777 <anon4321 at g?ai?.com> Jan 04, 2008
- 574 views
I have used the routine below, which I found by searching this forum, to successfully access help files, complete with context sensitive topic loading. However, it only loads specific pages when used with HLP files. While a CHM file will fire, it will never fire with focus on the specific page. Can anybody see if there is something I'm doing wrong? It is, of course, possible that the compiler I'm using somehow strays from the straight and narrow and therefore my attempt to use CHM files for context sensitive help is futile. I'm using HelpMaker 7.3.40.0 in case somebody has experience with that product. Thanks mike
global integer callWindowsHelp, libHtmlHelp libHtmlHelp = registerw32Library("hhctrl.ocx") global 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 file_ptr=acquire_mem(0,FileName) start = w32Func(callWindowsHelp, {getHandle(Window1), file_ptr,command, data}) release_mem(file_ptr) end procedure callWindowsHelp = registerw32Function(libHtmlHelp, "HtmlHelpA", {C_INT, C_INT, C_INT, C_INT}, C_INT) LetsCallWinHelp("C:\\pathtomyhelpfile\\myhelpfile.hlp",1,150)
======================================= Topic ID 150 loads just fine with myhelpfile.hlp. But using myhelpfile.chm it just loads the Getting Started page (topic id = 30), which is the lowest topic id that is a real page.
2. Re: Windows help help
- Posted by CChris <christian.cuvier at a?ri?ulture.gouv.fr> Jan 04, 2008
- 511 views
- Last edited Jan 05, 2008
Mike777 wrote: > > I have used the routine below, which I found by searching this forum, to > successfully > access help files, complete with context sensitive topic loading. However, > it only loads specific pages when used with HLP files. While a CHM file will > fire, it will never fire with focus on the specific page. Can anybody see if > there is something I'm doing wrong? It is, of course, possible that the > compiler > I'm using somehow strays from the straight and narrow and therefore my attempt > to use CHM files for context sensitive help is futile. I'm using HelpMaker > 7.3.40.0 in case somebody has experience with that product. > > Thanks > > mike > > }}} <eucode> > global integer callWindowsHelp, libHtmlHelp > libHtmlHelp = registerw32Library("hhctrl.ocx") > global 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 > file_ptr=acquire_mem(0,FileName) > start = w32Func(callWindowsHelp, {getHandle(Window1), file_ptr,command, data}) > release_mem(file_ptr) > end procedure > > callWindowsHelp = registerw32Function(libHtmlHelp, "HtmlHelpA", {C_INT, > C_INT, C_INT, C_INT}, C_INT) > > LetsCallWinHelp("C:\\pathtomyhelpfile\\myhelpfile.hlp",1,150) > </eucode> {{{ > ======================================= > > Topic ID 150 loads just fine with myhelpfile.hlp. But using myhelpfile.chm > it just loads the Getting Started page (topic id = 30), which is the lowest > topic id that is a real page. I expect you to benefit from this reading: http://www.help-info.de/en/Help_Info_HTMLHelp/hh_api.htm In particular, the page suggests using the HH_DISPLAY_TOPIC command, which is 0, instead of HH_DISPLAY_TOC, which is 1. I'm not surprised that you get the TOC using uCommand=1. CChris
3. Re: Windows help help
- Posted by Mike777 <anon4321 at gmail?c?m> Jan 07, 2008
- 584 views
CChris wrote: > > Mike777 wrote: > > > > I have used the routine below, which I found by searching this forum, to > > successfully > > access help files, complete with context sensitive topic loading. However, > > it only loads specific pages when used with HLP files. While a CHM file > > will > > fire, it will never fire with focus on the specific page. Can anybody see > > if > > there is something I'm doing wrong? It is, of course, possible that the > > compiler > > I'm using somehow strays from the straight and narrow and therefore my > > attempt > > to use CHM files for context sensitive help is futile. I'm using HelpMaker > > 7.3.40.0 in case somebody has experience with that product. > > > > Thanks > > > > mike > > > > }}} <eucode> > > global integer callWindowsHelp, libHtmlHelp > > libHtmlHelp = registerw32Library("hhctrl.ocx") > > global 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 > > file_ptr=acquire_mem(0,FileName) > > start = w32Func(callWindowsHelp, {getHandle(Window1), file_ptr,command, > > data}) > > release_mem(file_ptr) > > end procedure > > > > callWindowsHelp = registerw32Function(libHtmlHelp, "HtmlHelpA", {C_INT, > > C_INT, C_INT, C_INT}, C_INT) > > > > LetsCallWinHelp("C:\\pathtomyhelpfile\\myhelpfile.hlp",1,150) > > </eucode> {{{ > > ======================================= > > > > Topic ID 150 loads just fine with myhelpfile.hlp. But using myhelpfile.chm > > it just loads the Getting Started page (topic id = 30), which is the lowest > > topic id that is a real page. > > I expect you to benefit from this reading: > <a > href="http://www.help-info.de/en/Help_Info_HTMLHelp/hh_api.htm">http://www.help-info.de/en/Help_Info_HTMLHelp/hh_api.htm</a> You expect correctly! Thanks for the link. Cleared everything up. > In particular, the page suggests using the HH_DISPLAY_TOPIC command, which is > 0, instead of HH_DISPLAY_TOC, which is 1. I'm not surprised that you get the > TOC using uCommand=1. Just to clarify, since the third argument I'm using is the ID (an atom), not the string which is representative of the topic, then the page suggests using HH_HELP_CONTEXT (15). Thanks again. Mike