+void MyFrame::OnShowDialogContextHelp(wxCommandEvent& event)
+{
+ MyModalDialog dialog(this);
+ dialog.ShowModal();
+}
+
+void MyFrame::OnHtmlHelp(wxCommandEvent& event)
+{
+#if USE_HTML_HELP && USE_OLD_HTML_HELP
+ ShowHelp(event.GetId(), m_htmlHelp);
+#endif
+}
+
+void MyFrame::OnAdvancedHtmlHelp(wxCommandEvent& event)
+{
+#if USE_HTML_HELP
+ ShowHelp(event.GetId(), m_advancedHtmlHelp);
+#endif
+}
+
+void MyFrame::OnMSHtmlHelp(wxCommandEvent& event)
+{
+#if wxUSE_MS_HTML_HELP
+ ShowHelp(event.GetId(), m_msHtmlHelp);
+#endif
+}
+
+/*
+ Notes: ShowHelp uses section ids for displaying particular topics,
+ but you might want to use a unique keyword to display a topic, instead.
+
+ Section ids are specified as follows for the different formats.
+
+ WinHelp
+
+ The [MAP] section specifies the topic to integer id mapping, e.g.
+
+ [MAP]
+ #define intro 100
+ #define functions 1
+ #define classes 2
+ #define about 3
+
+ The identifier name corresponds to the label used for that topic.
+ You could also put these in a .h file and #include it in both the MAP
+ section and your C++ source.
+
+ Note that Tex2RTF doesn't currently generate the MAP section automatically.
+
+ MS HTML Help
+
+ The [MAP] section specifies the HTML filename root to integer id mapping, e.g.
+
+ [MAP]
+ #define doc1 100
+ #define doc3 1
+ #define doc2 2
+ #define doc4 3
+
+ The identifier name corresponds to the HTML filename used for that topic.
+ You could also put these in a .h file and #include it in both the MAP
+ section and your C++ source.
+
+ Note that Tex2RTF doesn't currently generate the MAP section automatically.
+
+ Simple wxHTML Help and External HTML Help
+
+ A wxhelp.map file is used, for example:
+
+ 0 wx.htm ; wxWindows: Help index; additional keywords like overview
+ 1 wx204.htm ; wxWindows Function Reference
+ 2 wx34.htm ; wxWindows Class Reference
+
+ Note that Tex2RTF doesn't currently generate the MAP section automatically.
+
+ Advanced HTML Help
+
+ An extension to the .hhc file format is used, specifying a new parameter
+ with name="ID":
+
+ <OBJECT type="text/sitemap">
+ <param name="Local" value="doc2.htm#classes">
+ <param name="Name" value="Classes">
+ <param name="ID" value=2>
+ </OBJECT>
+
+ Again, this is not generated automatically by Tex2RTF, though it could
+ be added quite easily.
+
+ Unfortunately adding the ID parameters appears to interfere with MS HTML Help,
+ so you should not try to compile a .chm file from a .hhc file with
+ this extension, or the contents will be messed up.
+ */
+
+void MyFrame::ShowHelp(int commandId, wxHelpControllerBase& helpController)
+{
+ switch(commandId)
+ {