It turns out that HH_INITIALIZE and HH_UNINITIALIZE are optional, and are for
authorjacob <jacob@cda61777-01e9-0310-a592-d414129be87e>
Tue, 13 Feb 2007 22:57:19 +0000 (22:57 +0000)
committerjacob <jacob@cda61777-01e9-0310-a592-d414129be87e>
Tue, 13 Feb 2007 22:57:19 +0000 (22:57 +0000)
putting HTML Help into "single-threaded" mode. Furthermore, this requires
extra work from the application (message pumping via HH_PRETRANSLATEMESSAGE).

Thus, remove them and run Help in a secondary thread. This means that keyboard
input into the Index and Search tabs now works.

git-svn-id: svn://svn.tartarus.org/sgt/putty@7285 cda61777-01e9-0310-a592-d414129be87e

windows/winhelp.c

index cc36bee..49a0fae 100644 (file)
@@ -21,7 +21,6 @@ static int help_has_contents;
 #ifndef NO_HTMLHELP
 typedef HWND (CALLBACK *htmlhelp_t)(HWND, LPCSTR, UINT, DWORD);
 static char *chm_path;
-static DWORD html_help_cookie;
 static htmlhelp_t htmlhelp;
 #endif /* NO_HTMLHELP */
 
@@ -63,9 +62,7 @@ void init_help(void)
            if (!htmlhelp)
                FreeLibrary(dllHH);
        }
-       if (htmlhelp)
-           htmlhelp(NULL, NULL, HH_INITIALIZE, (DWORD)&html_help_cookie);
-       else
+       if (!htmlhelp)
            chm_path = NULL;
     }
 #endif /* NO_HTMLHELP */
@@ -73,10 +70,9 @@ void init_help(void)
 
 void shutdown_help(void)
 {
-#ifndef NO_HTMLHELP
-    if (chm_path)
-       htmlhelp(NULL, NULL, HH_UNINITIALIZE, html_help_cookie);
-#endif /* NO_HTMLHELP */
+    /* Nothing to do currently.
+     * (If we were running HTML Help single-threaded, this is where we'd
+     * call HH_UNINITIALIZE.) */
 }
 
 int has_help(void)