wine/dlls/hhctrl.ocx hhctrl.c

Alexandre Julliard julliard at wine.codeweavers.com
Fri Nov 4 05:15:01 CST 2005


ChangeSet ID:	21106
CVSROOT:	/opt/cvs-commit
Module name:	wine
Changes by:	julliard at winehq.org	2005/11/04 05:15:01

Modified files:
	dlls/hhctrl.ocx: hhctrl.c 

Log message:
	James Hawkins <truiken at gmail.com>
	Pass HtmlHelp commands to doWinMain.

Patch: http://cvs.winehq.org/patch.py?id=21106

Old revision  New revision  Changes     Path
 1.8           1.9           +15 -4      wine/dlls/hhctrl.ocx/hhctrl.c

Index: wine/dlls/hhctrl.ocx/hhctrl.c
diff -u -p wine/dlls/hhctrl.ocx/hhctrl.c:1.8 wine/dlls/hhctrl.ocx/hhctrl.c:1.9
--- wine/dlls/hhctrl.ocx/hhctrl.c:1.8	4 Nov 2005 11:15: 1 -0000
+++ wine/dlls/hhctrl.ocx/hhctrl.c	4 Nov 2005 11:15: 1 -0000
@@ -30,6 +30,8 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(htmlhelp);
 
+int WINAPI doWinMain(HINSTANCE hInstance, LPSTR szCmdLine);
+
 static const char *command_to_string(UINT command)
 {
 #define X(x) case x: return #x
@@ -72,19 +74,28 @@ static const char *command_to_string(UIN
 
 HWND WINAPI HtmlHelpW(HWND caller, LPCWSTR filename, UINT command, DWORD data)
 {
-    FIXME("(%p, %s, command=%s, data=%ld): stub\n",
+    CHAR *file = NULL;
+
+    TRACE("(%p, %s, command=%s, data=%ld)\n",
           caller, debugstr_w( filename ),
           command_to_string( command ), data);
 
+    if (filename)
+    {
+        DWORD len = WideCharToMultiByte( CP_ACP, 0, filename, -1, NULL, 0, NULL, NULL );
+
+        file = HeapAlloc( GetProcessHeap(), 0, len );
+        WideCharToMultiByte( CP_ACP, 0, filename, -1, file, len, NULL, NULL );
+    }
+
     switch (command)
     {
         case HH_DISPLAY_TOPIC:
         case HH_DISPLAY_TOC:
         case HH_DISPLAY_SEARCH:
         case HH_HELP_CONTEXT:
-            MessageBoxA( NULL, "HTML Help functionality is currently unimplemented.\n\n"
-                         "Try installing Internet Explorer, or using a native hhctrl.ocx with the Mozilla ActiveX control.",
-                         "Wine", MB_OK | MB_ICONEXCLAMATION );
+            FIXME("Not all HH cases handled correctly\n");
+            doWinMain(GetModuleHandleW(NULL), file);
         default:
             return 0;
     }



More information about the wine-cvs mailing list