]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/helpwin.cpp
cw makefile for minimal - to be used as template
[wxWidgets.git] / src / msw / helpwin.cpp
index 07d27cdf58e4a4657b0d47061c8fc0f66adbcc43..e761c09d457b7e8a4e17f50c40b4e2033790e644 100644 (file)
 
 #include "wx/msw/helpwin.h"
 
-#if USE_HELP
+#if wxUSE_HELP
 #include <time.h>
 
-#ifdef __WINDOWS__
+#ifdef __WXMSW__
 #include <wx/msw/private.h>
 #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