X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2bda0e173844e8e0f8acf4e8ad8b5c26e5c6fe5d..520e470fdd0daef09c77938db642e4583933c90d:/src/msw/helpwin.cpp diff --git a/src/msw/helpwin.cpp b/src/msw/helpwin.cpp index 07d27cdf58..e761c09d45 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; @@ -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