X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/69b5cec2b0993ce4cd56f2e50ab94e5ebd20069c..8b0d53975d0d1c973b5392e035974cb37975a138:/src/html/helpctrl.cpp diff --git a/src/html/helpctrl.cpp b/src/html/helpctrl.cpp index 9f1de8e409..5f0bc3fd68 100644 --- a/src/html/helpctrl.cpp +++ b/src/html/helpctrl.cpp @@ -38,6 +38,12 @@ #if wxUSE_HELP #include "wx/tipwin.h" #endif + + +#if wxUSE_LIBMSPACK +#include "wx/html/forcelnk.h" +FORCE_LINK(wxhtml_chm_support) +#endif IMPLEMENT_DYNAMIC_CLASS(wxHtmlHelpController, wxHelpControllerBase) @@ -142,6 +148,7 @@ void wxHtmlHelpController::CreateHelpWindow() m_helpFrame->Create(NULL, wxID_HTML_HELPFRAME, wxEmptyString, m_FrameStyle); m_helpFrame->SetTitleFormat(m_titleFormat); + m_helpFrame->Show(TRUE); } @@ -187,10 +194,15 @@ bool wxHtmlHelpController::Initialize(const wxString& file) { actualFilename = dir + filename + wxString(wxT(".hhp")); if (!wxFileExists(actualFilename)) - return FALSE; + { +#if wxUSE_LIBMSPACK + actualFilename = dir + filename + wxString(wxT(".chm")); + if (!wxFileExists(actualFilename)) +#endif + return false; + } } } - return AddBook(wxFileName(actualFilename)); }