X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2bda0e173844e8e0f8acf4e8ad8b5c26e5c6fe5d..4a9968f92de93e099f698b51fe18058b6c4d0687:/src/msw/helpwin.cpp diff --git a/src/msw/helpwin.cpp b/src/msw/helpwin.cpp index 07d27cdf58..068165f21e 100644 --- a/src/msw/helpwin.cpp +++ b/src/msw/helpwin.cpp @@ -26,10 +26,10 @@ #include "wx/msw/helpwin.h" -#if USE_HELP +#if wxUSE_HELP #include -#ifdef __WINDOWS__ +#ifdef __WXMSW__ #include #endif @@ -54,7 +54,7 @@ wxWinHelpController::~wxWinHelpController(void) { } -bool wxWinHelpController::Initialize(const wxString& filename, int server) +bool wxWinHelpController::Initialize(const wxString& filename) { m_helpFile = filename; return TRUE; @@ -96,7 +96,7 @@ bool wxWinHelpController::DisplaySection(int section) bool wxWinHelpController::DisplayBlock(long block) { // Use context number -- a very rough equivalent to block id! - if (!m_helpFile) return FALSE; + if (m_helpFile == "") return FALSE; char buf[_MAXPATHLEN]; strcpy(buf, m_helpFile); @@ -131,7 +131,13 @@ bool wxWinHelpController::KeywordSearch(const wxString& k) // Can't close the help window explicitly in WinHelp bool wxWinHelpController::Quit(void) { - return TRUE; + if (wxTheApp->GetTopWindow()) + { + WinHelp((HWND) wxTheApp->GetTopWindow()->GetHWND(), 0, HELP_QUIT, 0L); + return TRUE; + } + else + return FALSE; } // Don't get notified of WinHelp quitting @@ -139,4 +145,4 @@ void wxWinHelpController::OnQuit(void) { } -#endif // USE_HELP +#endif // wxUSE_HELP