|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Visual Basic 6.0 has added support for HTML Help files?HTML Help files that eliminates the need for calling the API directly. See Visual Basic's online help for more information." Well, I've looked at VB's online help and I can find zilch on the subject. My app is currently set up for WinHelp. Various controls and forms have their HelpContextID set to match an appropriate topic. I press F1 and it just works. Now I want to hook a .CHM file to my VB6 app instead of .HLP, but I'm getting error "HH_HELP_CONTEXT called without a [MAP] section" I've found some information on the [MAP] section, which needs to be in the .hhp file, along with an [ALIAS] section, but I don't know how to relate a control's HelpContextID to the [MAP] section. For instance, if a textbox has its HelpContextID set to 500 and the topic I want to display is represented by hlp_coloursetter.htm, which is subsequently compiled into the .CHM file, how do I construct the [MAP] and [ALIAS] entries? Thanks! MM It's a while since I've looked at html help this but here's what I've got in
mine ' in Map_define.h #define IDH_WELCOME 1000 #define IDH_INTRODUCTION 1100 ' etc 'in Map_Alias.h IDH_WELCOME=Welcome.html IDH_INTRODUCTION=Introduction.html ' etc ' in myHelp.hhp [OPTIONS] ' various options here [WINDOWS] ' couple of lines here [FILES] ' alphabetical order Welcome.html Introduction.html ' etc [ALIAS] #include Map_Alias.h [MAP] #include Map_define.h Auto Index=Yes [INFOTYPES] ' hmm, nothing in this section All the above can be input via the "HTML Help Workshop" UI, or by editing the *.hhp. As written all the files would need to be in the same folder. The two context id's above of course are 1000 & 1100 I still use the html help API, I never worked out how not to hardcode the path of the help file. Also, although I call context help with F1 (about the control in focus), I also call help in various other ways, eg rt-click. You'd also need the API for popups. Anyway, hopefully the above template will get you going. Regards, Peter T Show quoteHide quote "MM" <kylix***@yahoo.co.uk> wrote in message news:7cg0q4dk6qr0mje2chkd2iguche7k8nrpr@4ax.com... > According to MS KB 189086, "Visual Basic 6.0 has added support for > HTML Help files that eliminates the need for calling the API directly. > See Visual Basic's online help for more information." > > Well, I've looked at VB's online help and I can find zilch on the > subject. > > My app is currently set up for WinHelp. Various controls and forms > have their HelpContextID set to match an appropriate topic. I press F1 > and it just works. > > Now I want to hook a .CHM file to my VB6 app instead of .HLP, but I'm > getting error "HH_HELP_CONTEXT called without a [MAP] section" > > I've found some information on the [MAP] section, which needs to be in > the .hhp file, along with an [ALIAS] section, but I don't know how to > relate a control's HelpContextID to the [MAP] section. > > For instance, if a textbox has its HelpContextID set to 500 and the > topic I want to display is represented by hlp_coloursetter.htm, which > is subsequently compiled into the .CHM file, how do I construct the > [MAP] and [ALIAS] entries? > > Thanks! > > MM
Show quote
Hide quote
On Sat, 21 Feb 2009 21:38:05 -0000, "Peter T" <peter_t@discussions> That's done the job, thanks!wrote: >It's a while since I've looked at html help this but here's what I've got in >mine > >' in Map_define.h >#define IDH_WELCOME 1000 >#define IDH_INTRODUCTION 1100 >' etc > >'in Map_Alias.h >IDH_WELCOME=Welcome.html >IDH_INTRODUCTION=Introduction.html >' etc > >' in myHelp.hhp >[OPTIONS] >' various options here > >[WINDOWS] >' couple of lines here > >[FILES] >' alphabetical order >Welcome.html >Introduction.html >' etc > >[ALIAS] >#include Map_Alias.h > >[MAP] >#include Map_define.h >Auto Index=Yes > >[INFOTYPES] >' hmm, nothing in this section > > >All the above can be input via the "HTML Help Workshop" UI, or by editing >the *.hhp. As written all the files would need to be in the same folder. The >two context id's above of course are 1000 & 1100 > > >I still use the html help API, I never worked out how not to hardcode the >path of the help file. Also, although I call context help with F1 (about the >control in focus), I also call help in various other ways, eg rt-click. >You'd also need the API for popups. Anyway, hopefully the above template >will get you going. > >Regards, >Peter T I didn't hardcode the path to the help file, I just placed the name of the .chm file in Project/Properties/Help File Name. So that is the ONLY difference between using WinHelp or HtmlHelp for my VB6 app, i.e. no HtmlHelp API declared anywhere! In fact, since the ContextIDs stay the same for either, I could retain ..hlp for, say, Windows 98, 2000 and XP and switch to .chm on Vista et seq by changing App.HelpFile on the fly. (I still prefer WinHelp to HtmlHelp, because it's what I've grown up with!) Thanks again. MM "MM" <kylix***@yahoo.co.uk> wrote in message I think it needs the full path there, which means hardcoding>>I still use the html help API, I never worked out how not to hardcode >> the path of the help file. > I didn't hardcode the path to the help file, I just placed the name of > the .chm file in Project/Properties/Help File Name. > seq by changing App.HelpFile on the fly. Ah ha, indeed that works without hard coding, obvious (now that is).> I could retain ..chm should work fine in all those versions, not sure about w95.> .hlp for, say, Windows 98, 2000 and XP and switch to .chm on Vista et > seq by changing App.HelpFile on the fly. Regards, Peter T
Show quote
Hide quote
On Sun, 22 Feb 2009 15:45:39 -0000, "Peter T" <peter_t@discussions> I DID end up declaring the HtmlHelp API as I needed this inwrote: >"MM" <kylix***@yahoo.co.uk> wrote in message > >>>I still use the html help API, I never worked out how not to hardcode >>> the path of the help file. > >> I didn't hardcode the path to the help file, I just placed the name of >> the .chm file in Project/Properties/Help File Name. > >I think it needs the full path there, which means hardcoding > >> seq by changing App.HelpFile on the fly. > >Ah ha, indeed that works without hard coding, obvious (now that is). > >> I could retain >> .hlp for, say, Windows 98, 2000 and XP and switch to .chm on Vista et >> seq by changing App.HelpFile on the fly. > >.chm should work fine in all those versions, not sure about w95. > >Regards, >Peter T > Form_Unload: Call HtmlHelp(Me.hWnd, App.HelpFile, HH_CLOSE_ALL, 0&) MM Maybe http://msdn.microsoft.com/en-us/library/aa261329(VS.60).aspx
Show quoteHide quote "MM" <kylix***@yahoo.co.uk> wrote in message news:7cg0q4dk6qr0mje2chkd2iguche7k8nrpr@4ax.com... > According to MS KB 189086, "Visual Basic 6.0 has added support for > HTML Help files that eliminates the need for calling the API directly. > See Visual Basic's online help for more information." > > Well, I've looked at VB's online help and I can find zilch on the > subject.
PropertyBag and settings
How to embed a Manifest File? Graphic Time Labeling how to reposition desktop icons ADO Recordset Find method Problem Test (yeah, I know) Visual Basic 6.0 on 64-Bit system Re: create pdf file in VB6 VB6 with SQLite: Is there a report generator/viewer? How to switch the monitor off through vb6 code? |
|||||||||||||||||||||||