Quantcast

wxHelpController (CHM) behaviour

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

wxHelpController (CHM) behaviour

jon bird
Hi,

I'm somewhat confused by the behaviour of wxHelpController (when it's
instantiated wxCHMHelpController) with regard to DisplaySection
(wxString).

So this is what I used to do when talking directly to HTML help:

  HtmlHelp ( hDlg, "playout.chm::/html/config.htm#soundcard"
,HH_DISPLAY_TOPIC, NULL ) ;

now according to the documentation, for DisplaySection: "For MS HTML
Help, wxHTML help and external HTML help, if section has a .htm or .html
extension, that HTML file will be displayed"

so my assumption is I can pass something in like:

DisplaySection(wxT("config.htm")) ;

and get similar results however instead I just get an error page.

Stepping through the code though, it doesn't make a great deal of sense
what it's doing, specifically here:

bool wxCHMHelpController::DisplaySection(const wxString& section)
{
    if (m_helpFile.IsEmpty())
        return false;

    // Is this an HTML file or a keyword?
    if ( section.Find(wxT(".htm")) != wxNOT_FOUND )
    {
        // interpret as a file name
        return CallHtmlHelp(HH_DISPLAY_TOPIC,
wxMSW_CONV_LPCTSTR(section));
    }

Inside CallHtmlHelp, "section" gets cast to a WXPARAM which ultimately
ends up as the "param" variable being passed to HtmlHelp:

htmlHelp(GetSuitableHWND(win), str, cmd, param);

which according to M$Soft is a DWORD:

dwData [in]

    Specifies any data that may be required, based on the value of the
uCommand parameter.

and the examples used with HH_DISPLAY_TOPIC all pass in NULL for this.

I would expect "section" to end up being concatenated (in some way) to
"str" to form the lookup in the .chm file.


Rgs,


Jon.

--
== jon bird - software engineer
== <reply to address _may_ be invalid, real mail below>
== <reduce rsi, stop using the shift key>
== posted as: news 'at' onastick 'dot' clara.co.uk

--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wx-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: wxHelpController (CHM) behaviour

jon bird
Sorry, scratch all that just re-read the htmlhelp page properly this
time...


In article <[hidden email]>, jon bird
<[hidden email]> writes

>Hi,
>
>I'm somewhat confused by the behaviour of wxHelpController (when it's
>instantiated wxCHMHelpController) with regard to DisplaySection
>(wxString).
>
>So this is what I used to do when talking directly to HTML help:
>
>  HtmlHelp ( hDlg, "playout.chm::/html/config.htm#soundcard"
>,HH_DISPLAY_TOPIC, NULL ) ;
>
>now according to the documentation, for DisplaySection: "For MS HTML
>Help, wxHTML help and external HTML help, if section has a .htm or .html
>extension, that HTML file will be displayed"
>
>so my assumption is I can pass something in like:
>
>DisplaySection(wxT("config.htm")) ;
>
>and get similar results however instead I just get an error page.
>
>Stepping through the code though, it doesn't make a great deal of sense
>what it's doing, specifically here:
>
>bool wxCHMHelpController::DisplaySection(const wxString& section)
>{
>    if (m_helpFile.IsEmpty())
>        return false;
>
>    // Is this an HTML file or a keyword?
>    if ( section.Find(wxT(".htm")) != wxNOT_FOUND )
>    {
>        // interpret as a file name
>        return CallHtmlHelp(HH_DISPLAY_TOPIC,
>wxMSW_CONV_LPCTSTR(section));
>    }
>
>Inside CallHtmlHelp, "section" gets cast to a WXPARAM which ultimately
>ends up as the "param" variable being passed to HtmlHelp:
>
>htmlHelp(GetSuitableHWND(win), str, cmd, param);
>
>which according to M$Soft is a DWORD:
>
>dwData [in]
>
>    Specifies any data that may be required, based on the value of the
>uCommand parameter.
>
>and the examples used with HH_DISPLAY_TOPIC all pass in NULL for this.
>
>I would expect "section" to end up being concatenated (in some way) to
>"str" to form the lookup in the .chm file.
>
>
>Rgs,
>
>
>Jon.
>
>--
>== jon bird - software engineer
>== <reply to address _may_ be invalid, real mail below>
>== <reduce rsi, stop using the shift key>
>== posted as: news 'at' onastick 'dot' clara.co.uk
>

--
== jon bird - software engineer
== <reply to address _may_ be invalid, real mail below>
== <reduce rsi, stop using the shift key>
== posted as: news 'at' onastick 'dot' clara.co.uk

--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wx-users
Loading...